Skip to content

Instantly share code, notes, and snippets.

View dtothefp's full-sized avatar

David Fox-Powell dtothefp

  • Flexport
  • United States
View GitHub Profile
from selenium.webdriver.common.by import By
import configzly
import suitecommon
PROJECT_ID = '382730986'
MVT_EXPERIMENT_ID = '388230124'
FORCE_MOBILE = True # Force the mobile version. if False, make sure the test is running in a mobile browser
class Suite(suitecommon.SuiteBase):
[push]
default = current
[user]
email = [email protected]
name = dtothefp
[alias]
al = add .
co = checkout
cb = checkout -b
st = status
!function(factory){"function"==typeof define&&define.amd?define(["jquery"],factory):factory("object"==typeof exports?require("jquery"):jQuery)}(function($){function encode(s){return config.raw?s:encodeURIComponent(s)}function decode(s){return config.raw?s:decodeURIComponent(s)}function stringifyCookieValue(value){return encode(config.json?JSON.stringify(value):String(value))}function parseCookieValue(s){0===s.indexOf('"')&&(s=s.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return s=decodeURIComponent(s.replace(pluses," ")),config.json?JSON.parse(s):s}catch(e){}}function read(s,converter){var value=config.raw?s:parseCookieValue(s);return $.isFunction(converter)?converter(value):value}var pluses=/\+/g,config=$.cookie=function(key,value,options){if(void 0!==value&&!$.isFunction(value)){if(options=$.extend({},config.defaults,options),"number"==typeof options.expires){var days=options.expires,t=options.expires=new Date;t.setTime(+t+864e5*days)}return document.cookie=[encode(key),"=",stringifyCookieVal
//https://github.com/node-inspector/node-inspector
//npm install -g node-inspector
/*
*
*to debug a node script
*$ node-debug server.js args to server --some --config
*opens the webkit inspector with a breakpoint on the first line
*
*/
body.homepage{
#signed-in-mobile {
display: none;
margin: 1em 0 8em 0;
}
&.signed-in {
#signed-in-mobile {
display: block;
}
#touch-cta {
@dtothefp
dtothefp / rounding.js
Created November 26, 2014 23:51
round decimals in JS
// this is only necessary because JS multiplying by 100 sometimes calculated a decimal
function checkDecPlaces(num) {
var str = num.toString(),
splitNum = str.split('.'),
intSplit = splitNum[0],
decSplit = splitNum[1],
processedNum;
if(splitNum.length === 2) {
if( Number(intSplit) === 0) {
Bundle 'Raimondi/delimitMate'
" delimitMat
let delimitMate_quotes = "\" \'"
let delimitMate_smart_quotes = 0
" NerdTree shortcut
nnoremap <leader>d :NERDTreeToggle<cr>
set virtualedit=onemore " Allow for cursor beyond last character, Stewart you may not want this as I think it is causing trailing white space
# Add this to .zshrc for VIM modes in shell....holy shit, amazing!!!!
# although this does effect the ability to scroll through bash history with ctlr+p, ctrl+n, if ctrl is remapped to cap locks via
# system preferences
bindkey -v
# preferences > keys -- hotkey to open iterm = option+space
# preferences > keys -- change hotkeys for moving previous/next tabs to more similar to VIM, combo with h (previous) l (next)
# preferences > profiles > keys -- right and/or left option key to +Esc, allows easier navigating of words in command line
commands:
0 info it worked if it ends with ok
1 verbose cli [ '/Users/dfox-powell/.nvm/v0.10.26/bin/node',
1 verbose cli '/Users/dfox-powell/.nvm/v0.10.26/bin/npm',
1 verbose cli 'run',
1 verbose cli 'deploy' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'predeploy', 'deploy', 'postdeploy' ]
5 info predeploy [email protected]
6 info deploy [email protected]
#!/bin/bash
source .nvm/nvm.sh
nvm use || nvm install
npm install --production
#npm update
nvm use
export PATH="$PATH:`pwd`/node_modules/.bin"
npm install bower
bower install