Skip to content

Instantly share code, notes, and snippets.

View wayneseymour's full-sized avatar
๐Ÿ’ญ
ABC...always be coding :)

Tre' wayneseymour

๐Ÿ’ญ
ABC...always be coding :)
View GitHub Profile
var Browser = require('zombie'),
url = require('url'),
fs = require('fs'),
$q = require('Q'),
saveDir = __dirname + '/_snapshots';
var scriptTagRegex = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi;
var stripScriptTags = function(html) {
  1. Download [jshint.vim][jshint]

  2. Put it in ~/.vim/plugin/jshint.vim

  3. Edit your local vimrc file (I'm on macvim with janus, so it's at ~/.gvimrc.local) and add:

    au BufWritePost *.js :JSHint
  4. Read the [vim docs][vim] and particularly [auto commands][auto] I'm a newb and the neckbeards are probably laughing at me for even posting this.

  1. Download [jshint.vim][jshint]

  2. Put it in ~/.vim/plugin/jshint.vim

  3. Edit your local vimrc file (I'm on macvim with janus, so it's at ~/.gvimrc.local) and add:

    au BufWritePost *.js :JSHint
  4. Read the [vim docs][vim] and particularly [auto commands][auto] I'm a newb and the neckbeards are probably laughing at me for even posting this.

### you have ctags but it does not work...
```shell
$ ctags -R --exclude=.git --exclude=log *
ctags: illegal option -- R
usage: ctags [-BFadtuwvx] [-f tagsfile] file ...
```
### you need to get new ctags, i recommend homebrew but anything will work
```shell
$ brew install ctags
@wayneseymour
wayneseymour / introrx.md
Created September 23, 2015 18:28 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called Reactive Programming, particularly its variant comprising of Rx, Bacon.js, RAC, and others.

Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.

@wayneseymour
wayneseymour / webdriver-hover.js
Created April 3, 2017 21:24 — forked from umaar/webdriver-hover.js
Hover over an element in WebDriverJS
/*
* Hover over an element on the page
*/
(function() {
"use strict";
var webdriver = require('selenium-webdriver');
var driver = new webdriver.Builder().usingServer().withCapabilities({'browserName': 'chrome' }).build();
@wayneseymour
wayneseymour / gist:ceb547729c7e76586a1618231c840b7b
Created October 3, 2017 15:42 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: ๐Ÿ˜„ :smile: ๐Ÿ˜† :laughing:
๐Ÿ˜Š :blush: ๐Ÿ˜ƒ :smiley: โ˜บ๏ธ :relaxed:
๐Ÿ˜ :smirk: ๐Ÿ˜ :heart_eyes: ๐Ÿ˜˜ :kissing_heart:
๐Ÿ˜š :kissing_closed_eyes: ๐Ÿ˜ณ :flushed: ๐Ÿ˜Œ :relieved:
๐Ÿ˜† :satisfied: ๐Ÿ˜ :grin: ๐Ÿ˜‰ :wink:
๐Ÿ˜œ :stuck_out_tongue_winking_eye: ๐Ÿ˜ :stuck_out_tongue_closed_eyes: ๐Ÿ˜€ :grinning:
๐Ÿ˜— :kissing: ๐Ÿ˜™ :kissing_smiling_eyes: ๐Ÿ˜› :stuck_out_tongue:
@wayneseymour
wayneseymour / sed cheatsheet
Created November 22, 2017 16:23 — forked from un33k/sed cheatsheet
magic of sed -- find and replace "text" in a string or a file
FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'
@wayneseymour
wayneseymour / debug-helpers.js
Created March 16, 2018 04:30 — forked from greglockwood/debug-helpers.js
Debug Helper Functions Snippet
const print = (param, ...args) => {
console.log(param, ...args);
return param;
};
const traceFn = (fn, context) => function () {
console.trace(`${fn.name} called with arguments: `, arguments);
return fn.apply(context || this, arguments);
};
const pipe = (...fns) => fns.reduce((f, g) => (...args) => g(f(...args)));
const compose = (...fns) => fns.reduce((f, g) => (...args) => f(g(...args)));
// Example
const addFoo = str => str + 'foo';
const addBar = str => str + 'bar';
const addFoobar = pipe(addFoo, addBar);
const addBarfoo = compose(addFoo, addBar);
addFoobar('hello ') // hello foobar
addBarfoo('hello ') // hello barfoo