This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const quickhash = (n) => [...n].map(s => s.charCodeAt(0)).reduce((a, b) => ((a << 3) ^ b) & ((1 << 31) - 1), 0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[keys.normal] | |
"K" = ["goto_prev_paragraph", "collapse_selection"] | |
"J" = ["goto_next_paragraph", "collapse_selection"] | |
0 = "goto_line_start" | |
"$" = "goto_line_end" | |
[keys.select] | |
p = "replace_selections_with_clipboard" | |
y = "yank_joined_to_clipboard" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/python3 | |
import os | |
import sys | |
# some basic argument parsing, so that ports, entrycommand and image can be specified | |
def args(): | |
image = 'node' | |
cmd = 'bash' | |
ports = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns beer-song | |
(:require [clojure.string :as string])) | |
(require '[clojure.core.match :refer [match]]) | |
;; 2 bottles of beer on the wall, 2 bottles of beer. | |
;; Take one down and pass it around, 1 bottle of beer on the wall. | |
;; 1 bottle of beer on the wall, 1 bottle of beer. | |
;; Take it down and pass it around, no more bottles of beer on the wall. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let log = n => console.log(n) | |
function binary(n) { | |
if (n == 0) return '0' | |
if (n == 1) return '1' | |
let last = String(n & 1 ) | |
return binary(n >> 1) + last | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use vulkano::device::Device; | |
use vulkano::device::DeviceExtensions; | |
use vulkano::device::Features; | |
use vulkano::instance::Instance; | |
use vulkano::instance::InstanceExtensions; | |
use vulkano::instance::PhysicalDevice; | |
const DEVICE_ID: usize = 1; | |
fn main() { | |
let instance = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn main() { | |
fib(0, 1, 75); | |
} | |
fn fib(a: u64, b: u64, count: u32) { | |
println!("{}", a); | |
if count > 0 { | |
fib(b, a+b, count-1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void rasterTri(double[][] v){ | |
int len = v[0].length; | |
int up = 0; | |
int down = 0; | |
for(int i=1; i<3;i++){ | |
if(v[i][1] < v[up][1]) up=i; | |
if(v[i][1] > v[down][1]) down=i; | |
} | |
int[] id= new int[3]; |