This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.R.def('async', [], function (exports) { | |
exports.handle = function (target, origin) { | |
var xhr = new XMLHttpRequest(); | |
xhr.onload = function () { | |
var data = JSON.parse(xhr.responseText); | |
for (var i = 0; i < data.changes.length; i++) { | |
window.R.publish('async.changeRequest', data.changes[i]); | |
} | |
}; | |
if (target.tagName = 'form') { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo rm -R ~/.vim | |
cat > ~/.vimrc << EOF | |
set nu | |
execute pathogen#infect() | |
syntax on | |
filetype plugin indent on | |
set t_Co=256 | |
set mouse=a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script src="primer.js"></script> | |
</head> | |
<body> | |
<button p-click="demo|notYetReady('test')">Try</button> | |
<script> | |
setTimeout(function () { | |
window.notYetReady = function (msg) { | |
alert(msg) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function foo() { | |
return { | |
hello: 'world' | |
}; | |
} | |
function bar() | |
{ | |
return | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
delay=5; prev=`du -sk .git/ | cut -f 1`; sleep $delay; while true; do cur=`du -sk .git/ | cut -f 1`; expr \( $cur - $prev \) / $delay ; prev=$cur; sleep $delay; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function IWillHuntYou () { | |
var stupidUser = false, // Never say that I am not an optimist | |
attack = function (window) { | |
// Add your attack here, It will be called each time a new page is loaded | |
// Example: | |
// window.document.documentElement.addEventListener('submit', function (evt) { | |
// sendTargetFormToEvilServerBeforeSubmitting(); | |
// }); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.clear(); | |
var targetReduction = 22, // Decompressor in KB | |
patternBytes = 1, | |
sequenceLengths = [4,5], | |
blocksize = 4; // Block size of FS in KB | |
// ---- Lot of technical mumbo-jumbo | |
var logs = [], | |
totalCompression = 0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Node.prototype.find = function (elms) { | |
if (typeof elms === 'string') { | |
return this.querySelector(elms); | |
} | |
var result = {}; | |
for (var key in elms) { | |
result[key] = this.find(elms[key]); | |
} | |
return result; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$psPath = ([environment]::getfolderpath("mydocuments") + '\WindowsPowerShell') | |
$modulePath = $psPath + '\Modules' | |
$modulePathExists = Test-Path $modulePath | |
if ($modulePathExists -eq $false) | |
{ | |
New-Item $modulePath -type directory | |
} | |
$modulesource = 'https://gist.githubusercontent.com/mortenolsendk/afdd9e2db9f1bea476d4/raw/modules.ps1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { PropTypes, Component } from 'react'; | |
import { connect as reduxConnect } from 'react-redux'; | |
export class Split extends Component { | |
static get childContextTypes() { | |
return { | |
stateMap: PropTypes.func, | |
}; | |
} |
OlderNewer