Skip to content

Instantly share code, notes, and snippets.

Gerald Leenerts gwing33

Block or report user

Report or block gwing33

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@gwing33
gwing33 / connectStream.js
Last active May 11, 2017
Higher Order Function to connect React to Rx Streams.
View connectStream.js
import _ from 'lodash';
import { Observable } from 'rx';
import React, { PropTypes } from 'react';
/* Connect Rx Stream to React Component
* - - - - - - - - - - - - - - - - - - -
* @param {func}
*
* @return {func}
* - @param {ReactComponent}
@gwing33
gwing33 / cli
Created Oct 12, 2012
casperjs script to change google search location
View cli
casperjs google_search_location.js pizza 'phoenix, az'
@gwing33
gwing33 / .bash_profile
Created Jan 21, 2012
My git shortcuts in my ~/.bash_profile
View .bash_profile
# Git Shortcuts
alias gs='git status'
alias gst='git status -sb'
alias ga='git add'
alias gau='git add -u' # Removes deleted files
alias gp='git pull'
alias gpu='git push'
alias gc='git commit -v'
alias gca='git commit -v -a' # Does both add and commit in same command, add -m 'blah' for comment
alias gco='git checkout'
View uploadFile.js
uploadFile () {
// CSV File
const csv = this.get("csv");
// Data to pass to the server
let data;
// Option 1) Use FormData (preferred)
data = new FormData();
data.append("csv", csv, "csv");
@gwing33
gwing33 / customMatcher.js
Created Jan 19, 2016
RxJS JestJS / Jasmine2 Custom Matcher
View customMatcher.js
/* * *
* Just a quick tester to help with Rx testing...
* - - -
* Be sure to include in the jest config...
* "setupTestFrameworkScriptFile": "<rootDir>/{pathTo}/customMatchers.js",
* "testRunner": "<rootDir>/../node_modules/jest-cli/src/testRunners/jasmine/jasmine2.js"
* - - -
* Usage...should be something similar to what is below (untested)
*
* const subject = new Rx.Subject();
@gwing33
gwing33 / ReverseSpeeds.js
Last active Jan 1, 2016
Testing which Reverse String methods are faster... run it here: http://jsperf.com/reverse-speeds/2
View ReverseSpeeds.js
// Run tests
function run_test(func) {
var j, s = 'asdfasdfasdf', name = func.name;
console.time(name);
for(j = 0; j <= 10000; j++) {
func(s);
}
console.timeEnd(name);
}
@gwing33
gwing33 / bootstrap_btn_color_mixin.sass
Created Apr 9, 2013
Sass + Compass Twitter bootstrap custom button color mixin
View bootstrap_btn_color_mixin.sass
=btn_color($primary)
$secondary: adjust-saturation(adjust-lightness($primary, 9), 37)
$tertiary: adjust-saturation(adjust-lightness($primary, 22), 5)
color: #ffffff
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25)
background-color: $primary
*background-color: $tertiary
+background-image(linear-gradient(top, $secondary, $primary))
background-repeat: repeat-x
View Desk Parts List.md

Wall Mounted Desk Parts List

  • Two 96 7/8" x 25 5/8" Logan Counter Tops
  • Eight 8" Corner Braces
  • One 3/4" Plain Steel Square Tube
  • Eight 1/4" x 5 1/2" Hex Bolts
  • Eight 1/4" Fender Washers
  • Eight Flush Screw in Bolts? (Couldn't find on HomeDepot website, but they are in the specialty hardware section…)
  • Lots of screws to fit the Corner Braces
  • 3 Packs of round Magnets
@gwing33
gwing33 / modal_window.html
Created Jul 5, 2012
found the root javascript somewhere, not sure...but I've modified it a lot...
View modal_window.html
<div id="some_id" class="window">
<!-- Some Html here... -->
<a href="#" class="close">Cancel</a>
</div>
<div id="mask"></div>
View Compass Shortcuts...
# Compass shortcuts
alias wat='compass watch'
You can’t perform that action at this time.