Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<title>console-log-div</title>
<script src="../bower_components/es5-shim/es5-shim.js"></script>
<style>
.console-log-div {
@caglarbozkurt
caglarbozkurt / cuckoo.js
Last active May 1, 2024 11:24
Cuckoo hashing simple web app
// Tables array is a 2-dimensional array that holds all tables.
// Inputs array holds the number and its input order.
// Failures array holds the number and its input order.
var tables = [], inputs = [], failures = [];
// There will be numberOfTables times hash numbers for input numbers.
var hashNumbers = [];
var sizeOfTables = 0, numberOfTables = 0, contentHTML = '';
var loopControl = 0;
var hashPrimes = [3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71,
73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163,
@LeightonSolo
LeightonSolo / gist:b62774f9c62bdc3e343cb198ec49bf35
Last active May 1, 2024 11:23
Calibrated Checkmarks for Live View, ARMS and Guardian
// ==UserScript==
// @name Calibrated Checkmarks for Live View, ARMS and Guardian
// @namespace http://tampermonkey.net/
// @version 2.8
// @description Shows which sensors have already been calibrated on the live view. This data only updates whenever the calibration overview, calibration summary, or arms debug query is viewed.
// @author Leighton Solomon
// @match https://*/arms2/index.php*
// @match https://*/arms2/
// @match https://*/arms/
// @match https://*/arms/index.php*
@claudiosanches
claudiosanches / functions.php
Created July 6, 2016 03:34
WooCommerce - Custom tag cloud shortcode
<?php
/**
* Custom WooCommerce tag cloud shortcode.
*
* Use the follow shortcode in your pages: [my_wc_tag_cloud]
*/
function my_custom_wc_tag_cloud_shortcode() {
return wp_tag_cloud( array( 'taxonomy' => 'product_tag', 'echo' => false ) );
}
var playTable = new Array(), row = 0, col = 0, rowPosit, colPosit, playElementValue = 0, sorted = 0, rP, cP;
//creates a 2dimensional array, filled wit zero-s; OK
function createPlayField() {
for (row = 0; row < 4; row++) {
playTable[row] = new Array();
for (col = 0; col < 4; col++) {
playTable[row][col] = 0;
}
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>API Scenario</title>
<script type="text/javascript"
src="http://discoveryserver.eqc.local:8080/SpotfireWeb/GetJavaScriptApi.ashx?Version=4.0"></script>
<script type="text/javascript">
<h2>My Favorite Movies</h2>
<button type="button" id="new-movie" class="btn btn-sm btn-primary">Add New Movie</button>
<div id="new-movie-form">
<div id="status" class="error"> </div>
<form name="movieform" class="movie-form">
<div class="form-group">
@richardgaywood
richardgaywood / vnv_on_steam_deck.md
Last active May 1, 2024 11:21
An incomplete guide to installing Fallout: Viva New Vegas on the Steam Deck

Intro & Disclaimers

I am not an expert, I am just Some Guy who happened to (a) get Viva New Vegas working on Steam Deck and (b) kept notes. These are those notes. I love Fallout and I love the Steam Deck and I want other people to experience those things, but I am also unable to promise to support you through every question you may have.

This is not a guide in the way that Viva New Vegas is a guide. VNV is incredibly well written and has your back every step of the way. These are just scribbles. Please set your expectations! Also, please tell me what doesn't work or is confusing! I would like us to work together to improve this process for others.

Who did this

This doc was written by docg/penllawen. Come say hi on the Viva New Vegas Discord or [this reddit thread]https://www.reddit.com/r/SteamDeck/comments/1c8uihm/an_incomplete_guide_to_installing_modded_fallout/).

@danielaAkerman
danielaAkerman / index.js
Created January 17, 2022 21:01
console.table
function Person(firstName, lastName) {
this.firstName = firstName;
this.lastName = lastName;
}
var me = new Person("Dani", "Akerman");
console.table(me);
@LGitHub-sprout
LGitHub-sprout / wes-bos-beginner-JS.js
Created January 17, 2022 17:45
console.assert, console.table, setTimeout()
<script defer>
console.log('Loading!');
const h1 = document.querySelector('h1');
console.log(h1.textContent);
console.assert(document.querySelector('h2'), 'h2 not found!');
const artists = [
{
first: 'René',
last: 'Magritte'
},