Skip to content

Instantly share code, notes, and snippets.

Steve Thomson OrganicPanda

Block or report user

Report or block OrganicPanda

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
View 1-pure360-angular-tech-test.md

Pure360 Angular Tech Test

Create a SPA that:

  • Displays list of emails
  • Allows the user to see a preview of each email. The user should be able to toggle the HTML and plain versions
    • HTML version is rendered correctly with styles
    • Plain version is rendered raw with line breaks preserved
  • Has unit tests
View 1-pure360-react-tech-test.md

Pure360 React Tech Test

Create a SPA that:

  • Displays list of emails
  • Allows the user to see a preview of each email. The user should be able to toggle the HTML and plain versions
    • HTML version is rendered correctly with styles
    • Plain version is rendered raw with line breaks preserved
  • Has unit tests
View node-nuke.sh
#!/bin/bash
brew uninstall node
brew prune
sudo rm -rf $HOME/{local,lib,include,node*,npm,.npm*}
sudo rm -rf /usr/local/lib/node*
sudo rm -rf /usr/local/include/node*
sudo rm -rf /usr/local/bin/{node,npm}
sudo rm -rf /usr/local/share/man/man1/node.1
@OrganicPanda
OrganicPanda / mouse-plugin.js
Created Jul 28, 2016
Track the mouse position in Protractor
View mouse-plugin.js
// Hook in to `addEventListener` to track the mouse and display it as a circle
exports.onPageLoad = function() {
return browser.executeScript(function() {
(function() {
var EventSniffer = function() {
this.history = [];
this.callbacks = {};
this.minCacheSize = 100;
this.maxCacheSize = 500;
};
View protractor-screenshot-and-upload.js
const screenshot = (text = '') => {
const upload = filename => {
const util = require('util');
const exec = require('child_process').exec;
const command = 'curl -sbv ' +
'-H \'Content-Type: multipart/form-data\' ' +
'-H \'Accept: application/json\' ' +
'-F "file=@./' + filename + '" ' +
'-F "upload_preset=kzrkwuhx" ' +
@OrganicPanda
OrganicPanda / foo.js
Last active Aug 29, 2015
Restangular Service
View foo.js
.factory('Search', function(Restangular, Me, constants) {
var profile = Restangular.one(constants.PROFILES, Me.get().view.of.id)
, serviceWithProfile = Restangular.service(constants.SEARCHES, profile)
, serviceNoProfile = Restangular.service(constants.SEARCHES);
serviceWithProfile.oneToOnes = function() {
return serviceWithProfile.getList({
searchType: constants.SEARCHES_ONE2ONE_TYPE
});
};
View Set-Up-OSX.md

Set up OSX

Install Brew

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
brew doctor
View keybase.md

Keybase proof

I hereby claim:

  • I am OrganicPanda on github.
  • I am organicpanda (https://keybase.io/organicpanda) on keybase.
  • I have a public key whose fingerprint is A583 A585 7B9D 2DD4 E60A ECBB AF5D 91DA A10A E031

To claim this, I am signing this object:

View Linux-Mac-Keyboard.md

#Linux Mint#

Layout

Change the keyboard to English (UK, Macintosh) in Preferences > Region and Language > Layouts tab.

Super/CTRL Keys

Add the following lines to ~/.Xmodmap:

View juan.js
/**
* Juan's leaving card: http://is.gd/juan_leaving
*/
(function() {
'use strict';
var message = [
' gg ',
' dP8, ',
' dP Yb ',
You can’t perform that action at this time.