- wget
- vim
fn add_positions<'a>(v_cc: &'a mut Vec<i32>, y: &Cell<i32>, x: &Cell<i32>) -> &'a mut Vec<i32> { | |
v_cc.push(x.get()); | |
v_cc.push(y.get()); | |
v_cc | |
} |
WebSockets
ES6
Ruby and ES6 classes (ES6 is fun, not scary)
Rust and why functional programming is safe
How to write unix/linux scripts in ruby (backticks are fun!)
'use strict' | |
const fs = require('fs') | |
const _ = require('lodash') | |
class Rejs { | |
constructor() { | |
if(fs.existsSync("rejs")) | |
return | |
fs.mkdirSync("rejs", err => { |
'use strict' | |
const fs = require('fs') | |
const _ = require('lodash') | |
const _resetTable = Symbol('resetTable'); | |
const _modifyTable = Symbol('modifyTable'); | |
const _replaceTable = Symbol('replaceTable'); | |
const _initialData = Symbol('initialData'); |
@count = 0 | |
def step_right | |
@count += 1 | |
if @count < 11 | |
puts "I STEPPED RIGHT" | |
else | |
return "I AM DONE" | |
end | |
step_right |
class Node { | |
constructor(data, next_node) { | |
this.data = data || null | |
this.next_node = next_node || null | |
} | |
} | |
class List { | |
constructor() { | |
this.head = new Node |
#[no_mangle] | |
pub extern fn read_json(ro: &'static str) -> String { | |
let roo = ro.to_string(); | |
let json_for_rust: HashMap<String, i32> = json::decode(&roo).unwrap(); | |
let encoded = json::encode(&json_for_rust).unwrap(); | |
encoded | |
} |
#[no_mangle] | |
pub extern fn nth_prime(num: u32) -> u32 { | |
let mut i = 0; | |
let mut count = 0; | |
while count <= num { | |
i += 1; | |
if prime(i) { | |
count += 1; | |
} | |
} |
extern crate rustc_serialize; | |
use rustc_serialize::json::{self, ToJson, Json}; | |
use std::collections::HashMap; | |
#[no_mangle] | |
pub extern fn read_json(ro: &'static str) -> String { | |
let roo = ro.to_string(); | |
let json_for_rust: HashMap<String, i32> = json::decode(&roo).unwrap(); | |
let encoded = json::encode(&json_for_rust).unwrap(); |