Skip to content

Instantly share code, notes, and snippets.

@0xjjpa
0xjjpa / population.js
Created March 10, 2013 03:04
Wrapper for data related to the age groups in the United States over the last 150 years. Retrieved from the Minnesota Population Center - http://ipums.org/
var population = [
{
"year": "1850",
"age": "0",
"sex": "1",
"people": "1483789"
},
{
"year": "1850",
"age": "0",
@0xjjpa
0xjjpa / binaryTree.js
Created February 16, 2013 16:42
Simple binary tree structure in a C-like syntax (no class, just node wrapper)
var Node = function(v, l, r) {
this.value = v; this.left = l || {}; this.right = r || {};
}
Node.prototype.addChildren = function(number) {
if(number) {
if(this.value) {
Node.prototype.parent = this;
if(this.value > number) {
Node.prototype.direction = "left";
Basic
=====
[Shift]+[Mod]+[Enter] - launch terminal.
[Mod]+[b] - show/hide bar.
[Mod]+[p] - dmenu for running programs like the x-www-browser.
[Mod]+[Enter] - push acive window from stack to master, or pulls last used window from stack onto master.
[Mod] + [j / k] - focus on next/previous window in current tag.
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 27, 2024 04:34
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@DimazzzZ
DimazzzZ / iso-639-1-codes.php
Last active April 27, 2024 04:34 — forked from ddebin/iso_array_lang.php
ISO 639-1 language codes array
<?php
$codes = [
'ab' => 'Abkhazian',
'aa' => 'Afar',
'af' => 'Afrikaans',
'ak' => 'Akan',
'sq' => 'Albanian',
'am' => 'Amharic',
'ar' => 'Arabic',
@Hirrolot
Hirrolot / tagless-final.rs
Last active April 27, 2024 04:30
Tagless-final encoding of a simple arithmetic language in Rust
trait Interp {
type Repr<T>;
fn lit(i: i32) -> Self::Repr<i32>;
fn add(a: Self::Repr<i32>, b: Self::Repr<i32>) -> Self::Repr<i32>;
}
struct Eval;
impl Interp for Eval {
@ww9
ww9 / one-line-text-art-and-emojis_utf8_ascii.txt
Last active April 27, 2024 04:27
Emojis, UTF8, ASCII (one line) #misc
# Collection of one line text art (◕‿◕✿)
Collection of emojis and one line text art like (╯°□°)╯︵ ┻━┻ 🤗
ּבּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
@Mithrandir0x
Mithrandir0x / gist:3639232
Created September 5, 2012 16:15
Difference between Service, Factory and Provider in AngularJS
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/
// author: Pawel Kozlowski
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"
{
"manifest_version": 2,
"name": "Chrome Socket API Server",
"description": "listen & accept for socket",
"version": "0.1",
"app": {
"background": {
"scripts": ["server.js"]
}
},