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
johntron> grasp ':matches(assign[left.prop=#strings],var-dec[id=#strings]) obj.props[val=literal].val' -r components-spirent/ | |
components-spirent/endpoint-view-model/index.js:79: "Field is required": "Field is required", | |
components-spirent/endpoint-view-model/index.js:80: "Must be less than 4,096": "Must be less than 4,096", | |
components-spirent/endpoint-view-model/index.js:81: "Must be an IP address": "Must be an IP address", | |
components-spirent/endpoint-view-model/index.js:82: "Must be greater than 0": "Must be greater than 0", | |
components-spirent/endpoint-view-model/index.js:83: "Must be less than 128": "Must be less than 128", | |
components-spirent/endpoint-view-model/index.js:84: "Must be less than or equal to 512": "Must be less than or equal to 512", | |
components-spirent/endpoint-view-model/index.js:85: "Must be an integer": "Must be an integer", | |
components-spirent/endpoint-view-model/index.js:86: "An endpoint already exists with this name": "An endpoint al |
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
Reporting server status on {{2014,5,28},{19,6,27}} | |
Status of node rabbit@tomahawk ... | |
[{pid,1262}, | |
{running_applications,[{rabbit,"RabbitMQ","2.6.1"}, | |
{os_mon,"CPO CXC 138 46","2.2.7"}, | |
{sasl,"SASL CXC 138 11","2.1.10"}, | |
{mnesia,"MNESIA CXC 138 12","4.5"}, | |
{stdlib,"ERTS CXC 138 10","1.17.5"}, | |
{kernel,"ERTS CXC 138 10","2.14.5"}]}, |
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
<!DOCTYPE html> | |
<body> | |
<style> | |
body { font-size: 12px; } | |
div .caption { | |
font-size: 12px; | |
} | |
.small { |
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
<button>Which page am I on?</button> | |
<script> | |
var Page = { | |
title: 'Home', | |
init: function() { | |
document.querySelector('button').onclick = function () { | |
alert('You are on the ' + this.title + ' page'); | |
}; | |
} |
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
def pummel_session(request): | |
import hashlib | |
import random | |
import time | |
now = time.time() | |
while time.time() < now + 60: | |
request.session[hashlib.md5().hexdigest()] = hashlib.md5().hexdigest() | |
request.session.changed() |
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
/* | |
http://www.reddit.com/r/dailyprogrammer/comments/2451r5/4282014_challenge_160_easy_trigonometric_triangle/ | |
Solutions: | |
C = 90 | |
f(a,b) = (a**2 + b**2)**-2 = c | |
f(a,c) = (c**2 - a**2)**-2 = b | |
f(b,c) = (c**2 - b**2)**-2 = 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
// jQuery's .trigger() doesn't fire handlers bound with the native .addEventListener() - here's a workaround for modern browsers (IE 9+) | |
var $el = $('.my-el'), | |
e; | |
try { | |
e = new Event('change'); | |
} catch (unused) { |
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
var read = require('fs').readFileSync; | |
module.exports = function (builder) { | |
builder.hook('before scripts', function (pkg, next) { | |
var config = pkg.config, | |
tests = config.tests, | |
development = config.development; | |
if (!tests) return next(); |
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
var message = "foo"; | |
function show() { | |
alert(message); | |
} | |
// Insert your code here | |
show(); |
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
<div class="number"></div> | |
<input type="text" /><button class="update">update</button> | |
<script type="text/javascript"> | |
var $number = document.querySelector('.number'); | |
var $input = document.querySelector('input'); | |
function show() { | |
$number.innerHTML = this.value; | |
} |