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
| var exec = require('child_process').execFileSync; | |
| var file = 'C:\\Program Files\\AutoHotkey\\AutoHotkey.exe'; | |
| exec(file, ['test.ahk', 'Hey Dawg']); |
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
| 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 |
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
| 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', |
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
| StartX=1405 | |
| StartY=560 | |
| SizeX=50 | |
| SizeY=50 | |
| ClickOffset=15 | |
| itemF1_1 := {x: 10, y: 3} | |
| itemF1_2 := {x: 10, y: 5} | |
| return |
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 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'} | |
| ]; |
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
| 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 |
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
| 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? |
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
| function myPromise () { | |
| return new Promise((resolve) => { | |
| setTimeout(() => { | |
| console.log('fourth a'); | |
| resolve('fourth b'); | |
| }, 200); | |
| }); | |
| } | |
| async function second () { |
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
| 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%/}" |
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
| 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); |