Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<style id="jsbin-css">
#block { width: 200px; height: 200px; background-color: #f00; }
#button-set { margin-bottom: 5px; }
(function () {
WebSocket.prototype._send = WebSocket.prototype.send;
WebSocket.prototype.send = function (data) {
this._send(data);
this.addEventListener('message', function (msg) {
console.log('>> ' + msg.data);
}, false);
this.send = function (data) {
this._send(data);
console.log("<< " + data);
$.getScript('https://cdnjs.cloudflare.com/ajax/libs/reqwest/2.0.5/reqwest.js');
$.getScript('https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js);
$.getScript('https://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.3.3/backbone-min.js');
#Reload HEAD
###### Have to do every morning and evening
```bash
$> (master): git fetch origin master
$> (master): git status
$> (master): git pull origin master
$> (master): git checkout feature#id
$> (feature#id): git merge --no-ff master
```
@tomcask
tomcask / git alias config
Last active April 26, 2017 10:45
alias to show commits between master and head
git config --global alias.lg-show-commits 'log origin/master..HEAD'
git config --global alias.co checkout
git config --global alias.ci commit
git config --global alias.br branch
git config --global alias.st status
git config --global alias.unstage 'reset HEAD --'
git config --global alias.last 'log -1 HEAD'
@tomcask
tomcask / seed react app package.json
Created October 26, 2016 10:31
seed React + redux + webpack + babel dependencies package.json
{
"name": "Seed to react + redux + webpack + babel",
"version": "1.0.0",
"description": "Seed to react + redux + webpack + babel",
"main": "app.js",
"scripts": {
"start": "node app.js",
"build": "webpack",
"watch": "webpack --watch",
"test": "mocha --require test/helpers/setup.js",
@tomcask
tomcask / search linkedin persons
Last active October 27, 2016 08:17
Search all people working in a company with linkedin
company.com site:linkedin.com/in/
@tomcask
tomcask / cheatsheet-array-methods.md
Last active November 3, 2016 10:21
cheatsheet Manipulate Array methods

##Diagram...

unshift → array ← push

shift ← array → pop

##Chart:

action add remove start end
@tomcask
tomcask / DropboxIgnore.md
Created November 3, 2016 23:09 — forked from idleberg/DropboxIgnore.md
Ignore node_modules/bower_components folders in your Dropbox

This script scans your Dropbox (or any given folder) for folders stored in the ignore array and excludes them from syncing. Makes use of the official Dropbox CLI

I'm a beginner at bash, so all improvements are welcome!

#!/bin/bash

set -e

# SETTINGS
@tomcask
tomcask / .gitconfig
Last active November 4, 2016 12:24 — forked from shawndumas/.gitconfig
Using WinMerge as the git Diff/Merge Tool on Windows 64bit
[mergetool]
prompt = false
keepBackup = false
keepTemporaries = false
[merge]
tool = winmerge
[mergetool "winmerge"]
name = WinMerge