Skip to content

Instantly share code, notes, and snippets.

💭
Home from military deployment

Austin Cheney prettydiff

💭
Home from military deployment
Block or report user

Report or block prettydiff

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 gist:f9f85fffb00a903ecd3f2cfe0c276d62
security = function dom_load_security():void {
const scripts:HTMLCollectionOf<HTMLScriptElement> = document.getElementsByTagName("script"),
exclusions:string[] = [
"", //put relative addresses for your authorized scripts here
],
len:number = scripts.length,
exlen:number = exclusions.length;
let a:number = 0,
b:number = 0,
src:string = "";
View gist:a00644187cafeb67c9da2c24c0079042
var List = React.createClass({
renderList: function () {
return this.props.items.map(function (item) {
return <ListItem item={value} key={keyvalue.id} />;
});
},
render: function () {
return <ul className="List">
this.renderList()
@prettydiff
prettydiff / gist:8682c3a4bbaadd1a0fe0103f1ad65c98
Last active Mar 18, 2018
color cycle text for the commandline
View gist:8682c3a4bbaadd1a0fe0103f1ad65c98
function changeColor(str) {
const arr = str.split("");
let a = arr.length - 1,
b = 8;
do {
arr[a] = `\u001b[3${b}m${arr[a]}`;
a = a - 1;
b = b - 1;
if (b < 1) {
View eslint failing file
window.parseFramework={language:function framework_language(){"use strict";return},lexer:{},parse:{},parseerror:"",parser:function framework_parser(){"use strict";return}};/*
Parse Framework
*/
/*jslint node:true */
/*eslint-env node*/
/*eslint no-console: 0*/
/*global global, location*/
(function parse_init() {
"use strict";
let framework;
View kakashial
users.put('/users/:id', (req, res, next) => {
function validateAuthentication(userId) {
if (userId) {
throw Unauthenticated('You have to log in');
}
}
function ValidateOtherPermission(user) {
const hasPermission = checkPermission({
actualRole: user.Role,
@prettydiff
prettydiff / index.html
Created Jul 11, 2017
dom walking versus querySelector - 3 (http://jsbench.github.io/#19326344341cbc33122e0e8fbbd21b5a) #jsbench #jsperf
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>dom walking versus querySelector - 3</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@prettydiff
prettydiff / index.html
Created Jul 11, 2017
dom walking versus querySelector - 2 (http://jsbench.github.io/#ae7713b7b1db5878d60ecd1f827e091d) #jsbench #jsperf
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>dom walking versus querySelector - 2</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@prettydiff
prettydiff / index.html
Created Jul 11, 2017
dom walking versus querySelector - 1 (http://jsbench.github.io/#24d619b25e826b4d2914a138ce9eb274) #jsbench #jsperf
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>dom walking versus querySelector - 1</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>dom walking versus querySelector</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
View gist:0e2a3cfd1a494e1afb0e762df85d2163
/*jshint laxbreak: true*/
/*jslint node: true, for: true*/
(function biddle() {
"use strict";
var node = {
child: require("child_process").exec,
fs: require("fs"),
http: require("http"),
https: require("https"),
path: require("path")
You can’t perform that action at this time.