This file contains hidden or 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
#!/usr/bin/env bash | |
set -e | |
function ADD_AUTHOR { | |
local author_to_add=$1 | |
if ! [ -z "${author_to_add}" ]; then | |
#add something to add people to review in your source repo | |
fi |
This file contains hidden or 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
// abs.js | |
const FILES = require('fs'); | |
module.exports = { | |
absorb: (htmlPath) => { | |
let html = FILES.readFileSync(htmlPath, 'utf8'); | |
html = html.replace(/(<absorb\s(.+)\/>)/g, function(absorbElement) { | |
let filePath = '', fileType = '', jsMod = ''; | |
if (absorbElement.indexOf('css=') >= 0) { |
This file contains hidden or 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
writeln("setting up server...") | |
server := HttpServer clone do( | |
setPort(8090) | |
renderResponse := method(request, response, | |
list("path", "uri", "body") foreach(k, | |
v := request perform(k) | |
response body appendSeq(k .. ": " .. v .. "<br>") | |
) |
This file contains hidden or 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
const ajax = require('utils/ajax'); | |
const Promise = require('Promise'); | |
/* | |
* The queue itself... | |
* | |
* @param {String} retryConut The number of times that it should retry a request | |
* before it gives up and rejects it. | |
* | |
* @return {object} |
This file contains hidden or 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
const saveQueue = [ | |
slide, | |
slide1, | |
slide2, | |
slide | |
]; | |
const attemptedSlides = {}; | |
const running = false; |
This file contains hidden or 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
getComputedBG = function (elem) { | |
var rtn = window.getComputedStyle(elem)['background-color'], | |
element = elem, | |
isTransparent = function (color) { | |
return color === 'rgba(0, 0, 0, 0)' || color === 'transparent' | |
}; | |
while (element !== null && isClear(rtn)) { | |
element = element.parentElement; | |
rtn = window.getComputedStyle(element)['background-color']; |
This file contains hidden or 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 http = require('http'); | |
var server = http.createServer(function (req, res) { | |
console.log(req.url); | |
if (req.url !== '/api/presence' && req.url !== '/api/heartbeat') { | |
res.statusCode = 500; | |
res.end('error'); | |
} else { | |
res.end('works'); | |
} |
This file contains hidden or 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
#!/bin/sh | |
rm -rf node_modules/ | |
npm install |
This file contains hidden or 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 arr = [ | |
'\\', | |
'|', | |
'/', | |
'-', | |
] | |
, position = 0; | |
arr = arr.concat(arr, arr, arr, arr, arr, arr); |
This file contains hidden or 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
#!/usr/bin/env zsh | |
# ------------------------------------------------------------------------------ | |
# | |
# Lone Star - A futuristic minimal awesome Texas inspired theme for zsh | |
# | |
# Based heavily on the pure theme which includes the following note: | |
# | |
# Based on the custom Zsh-prompt of the same name by Sindre Sorhus. A huge | |
# thanks goes out to him for designing the fantastic Pure prompt in the first |