command + option + esc = force quit command + , = preferences command + w = close window option + command + w = close all window command + l = address bar command + `- = switch between windows command + shift + t = open previously closed tabs command + ; = spelling control + command + D = dictionary lookup option + delete = delete word
This file contains 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/bin/env node | |
const fs = require('fs') | |
const path = require('path') | |
function traverse(o, func) { | |
for (let i in o) { | |
o[i] = func(i, o[i]) | |
if (o[i] && typeof o[i] == 'object') { |
This file contains 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
Show hidden characters
{ | |
"parser": "babel-eslint", | |
"extends": [ | |
"standard", | |
"plugin:react/recommended", | |
"prettier", | |
"prettier/react", | |
"prettier/standard" | |
], | |
"plugins": ["react", "prettier", "standard"], |
As configured in my dotfiles.
start new:
tmux
start new with session name:
This file contains 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
const createElement = React.createElement | |
React.createElement = (element, props, children, ...args) => { | |
// Fancy Logging for React Element Creation | |
const _props = props ? Object.entries(props).map(([k, v]) => `${k}=${JSON.stringify(v)}`).join(' ') : '' | |
console.log(`Creating %c<${element} %c${_props} %c/>`, 'color: teal; font-weight: bold', 'color: #777', 'color: teal') | |
// TODO: Monkey Patch your code here. | |
return createElement(element, props, children, ...args) |
This file contains 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
macro_rules! greet { | |
($name:expr) => { | |
println!("Greetings, {}!", $name); | |
}; | |
} | |
fn main() { | |
greet!("Phoom") | |
} |
This file contains 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
macro_rules! hey { | |
() => { | |
println!("Hey, Macros!"); | |
}; | |
} | |
fn main() { | |
hey!() | |
} |
This file contains 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 std::collections::HashMap; | |
macro_rules! mapping { | |
( $key:expr => $value:expr ) => {{ | |
let mut m = HashMap::new(); | |
m.insert($key, $value); | |
m | |
}}; | |
} |
This file contains 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
macro_rules! mapping { | |
( $($key:expr => $value:expr),* ) => { | |
{ | |
let mut m = HashMap::new(); | |
$( | |
m.insert($key, $value); | |
)* | |
m |
This file contains 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
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] |