Skip to content

Instantly share code, notes, and snippets.

View itsthatguy's full-sized avatar
✌️
Love.

Kevin Altman itsthatguy

✌️
Love.
View GitHub Profile
@itsthatguy
itsthatguy / foo.js
Created May 16, 2015 04:36
run: node foo.js
var exec = require('child_process').execFileSync;
var file = 'C:\\Program Files\\AutoHotkey\\AutoHotkey.exe';
exec(file, ['test.ahk', 'Hey Dawg']);
@itsthatguy
itsthatguy / dosh.sh
Last active August 29, 2015 14:22 — forked from bigtiger/dosh.sh
dosh() {
if [ "$1" = "-h" ] || [ "$1" = "--help" ] || [ "$1" = "help" ]
then
read -r -d '' VAR << EOM
Usage: dosh [argument]
Arguments:
ls (default) lists running containers
[name|id] runs bash for specified container
help, -h, --help brings up this help
module.exports = {
data: [
{
title: 'Conversational',
demo_url: './assets/media/DonovanCorneetz_UrbanDemo.mp3',
type: 'audio/mpeg'
},
{
title: 'Urban',
demo_url: 'http://www.donovanvo.com/Media/DonovanCorneetz_ConversationalDemo.mp3',
StartX=1405
StartY=560
SizeX=50
SizeY=50
ClickOffset=15
itemF1_1 := {x: 10, y: 3}
itemF1_2 := {x: 10, y: 5}
return
let firstCollection = [
{id: 1, name: 'dog', item_id: 47},
{id: 2, name: 'truck', item_id: 38},
{id: 3, name: 'martian', item_id: 123}
];
let secondCollection = [
{id: 123, name: 'martian'}
];
def conditional_names(*args)
# puts params.is_a?(String)
classes = []
args.each do |arg|
classes << arg if arg.is_a?(String)
if arg.is_a?(Array)
classes << conditional_names(*arg)
end
import React, {PureComponent} from 'react';
// I've setup webpack to use relative paths from the src/ directory
import Results from 'Results';
import SearchBar from 'SearchBar';
// What is a PureComponent?
class Layout extends PureComponent {
// constructor receives props
// should we explain props?
function myPromise () {
return new Promise((resolve) => {
setTimeout(() => {
console.log('fourth a');
resolve('fourth b');
}, 200);
});
}
async function second () {
function git_dir_helper() {
current_dir=${PWD##*/}
if git rev-parse --git-dir > /dev/null 2>&1 && [ ! -d .git ]; then
git_dir_cdup=$(git rev-parse --show-cdup)
git_dir_path=$(git rev-parse --show-prefix)
git_dir_top="$(
cd $git_dir_cdup > /dev/null
echo ${PWD##*/}
)"
current_dir="$git_dir_top/${git_dir_path%/}"
var nlp = require('compromise')
function parseCommand (input) {
var doc = nlp(input)
var cmd = doc.verbs().out('array');
var objects = doc.nouns().out('array');
console.log(cmd);
console.log(objects);