Skip to content

Instantly share code, notes, and snippets.

View chill-cod3r's full-sized avatar
🎯
Focusing

chill-cod3r

🎯
Focusing
View GitHub Profile
@liamcurry
liamcurry / gist:2597326
Created May 4, 2012 19:56
Vanilla JS vs jQuery

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@jboner
jboner / latency.txt
Last active August 15, 2025 16:42
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@Aricg
Aricg / gist:3948021
Created October 24, 2012 18:48
remove rabbitmq and start again
#!/bin/bash
/etc/init.d/rabbitmq-server stop
for x in $(ps -ef | grep -v grep | grep rabbit | awk '{print $2}'); do kill -9 $x; echo "Process id $x is killed"; done
rm /var/lib/rabbitmq/.erlang.cookie
rm -rf /var/lib/rabbitmq/mnesia/
rm -rf /etc/rabbitmq/
apt-get remove --purge rabbitmq-server
apt-get autoremove
@joyrexus
joyrexus / README.md
Last active August 1, 2025 10:41 — forked from liamcurry/gist:2597326
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@staltz
staltz / introrx.md
Last active August 15, 2025 20:30
The introduction to Reactive Programming you've been missing
@DanDiplo
DanDiplo / JS-LINQ.js
Last active August 10, 2025 14:59
JavaScript equivalents of some common C# LINQ methods. To help me remember!
// JS array equivalents to C# LINQ methods - by Dan B.
// First: This version using older JavaScript notation for universal browser support (scroll down for ES6 version):
// Here's a simple array of "person" objects
var people = [
{ name: "John", age: 20 },
{ name: "Mary", age: 35 },
{ name: "Arthur", age: 78 },
{ name: "Mike", age: 27 },
@mchelen
mchelen / .gitignore
Last active October 31, 2017 16:00 — forked from mchelen/.gitignore
*~
bundle.js
bundle.min.js
node_modules
@planetoftheweb
planetoftheweb / bootstrapCDN.html
Created July 8, 2015 01:25
Bootstrap 3 CDN Page Code
<!-- HEAD SECTION -->
<!-- IE Edge Meta Tag -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Viewport -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
@001101
001101 / accounting.sql
Created February 18, 2017 09:08 — forked from NYKevin/accounting.sql
Basic double-entry bookkeeping system, for PostgreSQL.
CREATE TABLE accounts(
id serial PRIMARY KEY,
name VARCHAR(256) NOT NULL
);
CREATE TABLE entries(
id serial PRIMARY KEY,
description VARCHAR(1024) NOT NULL,
amount NUMERIC(20, 2) NOT NULL CHECK (amount > 0.0),
-- Every entry is a credit to one account...
@shalotelli
shalotelli / index.html
Created May 24, 2017 01:16
Creating Web Components in JavaScript (ES6) to use in your Angular, React and Ember projects
<!DOCTYPE html>
<html>
<head>
<title>Web Components</title>
<style>
body {
font-family: 'Helvetica Neue';
}
</style>