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
#!/usr/bin/env bash | |
BUILD_DIR="build" | |
PREMAKE_VERSION="5.0.0-alpha14" | |
OS_NAME="$(uname -s)" | |
case $OS_NAME in | |
Linux*) | |
PREMAKE_OS="linux" | |
PREMAKE_EXT=".tar.gz" |
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
#!/usr/bin/env bash | |
FILES=`grep -IUlr $'\r' ${@}` | |
for file in $FILES; do | |
dos2unix $file | |
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
#!/usr/bin/env node | |
const fs = require('fs'); | |
const byline = require('byline'); | |
const rgxName = /\.mdi-([^:]+):before {/; | |
const rgxCode = / content: "\\(F[0-9A-Fa-f]{3})";/; | |
const istream = byline(fs.createReadStream('css/materialdesignicons.css', { encoding: 'utf8' })); |
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
// The suite used for all emit tests. | |
'use strict'; | |
/** | |
* Preparation code. | |
*/ | |
var EventEmitter3 = require('eventemitter3'), | |
EventEmitter1 = require('events').EventEmitter, | |
MiniRunner = require('mini-runner'), | |
MiniSignal = require('../src/index'), |
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
Show hidden characters
{ | |
"env": { | |
"es6": true, | |
"commonjs": true, | |
"browser": true | |
}, | |
"globals": { | |
}, | |
"parserOptions": { | |
"ecmaVersion": 6, |
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
// example of a simple in-memory cache for resources | |
var cache = {}; | |
module.exports = function (options) { | |
return function (resource, next) { | |
// if cached, then set data and complete the resource | |
if (cache[resource.url]) { | |
resource.data = cache[resource.url]; | |
resource.complete(); | |
} |
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
// file: my/namespace/something/SomethingRequestMessage.js | |
var ProtoBuf = require('protobufjs'); | |
function SomethingRequest() { | |
ProtoBuf.Message.apply(this, arguments); | |
this.addField(new ProtoBuf.Message.Field('required', 'int64', 'id', 1)); | |
} | |
SomethingRequest.prototype = Object.create(ProtoBuf.Message.prototype); |
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
#!/bin/bash | |
IPT="/sbin/iptables" | |
### Interfaces ### | |
PUB_IF="eth0" # public interface | |
PRV_IF="eth1" # private interface | |
LO_IF="lo" # loopback | |
SERVER_IP=$(ifconfig eth0 | grep 'inet addr:' | awk -F'inet addr:' '{ print $2}' | awk '{ print $1}') |
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 seData() { | |
var e = localStorage.getItem("se:fkey"); | |
if (!e) | |
return {"time": 0}; | |
var t = e.split(/,/); | |
return {"fkey": t[0],"time": parseInt(t[1], 10)} | |
} | |
function cheat() { | |
$.get("/unicoin/rock").done(function(e) { |
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 Light(pos, color, falloff) { | |
this.position = pos instanceof gf.Vector ? pos : new gf.Vector(); | |
if(color == null) | |
this.color = new gf.Color(0xffffff); | |
else if(typeof color === 'number') | |
this.color = new gf.Color(color); | |
else | |
this.color = color; |
NewerOlder