Skip to content

Instantly share code, notes, and snippets.

View Evgenus's full-sized avatar
🇺🇦
Ukraine

Eugene Chernyshov Evgenus

🇺🇦
Ukraine
View GitHub Profile
public class DialogueEntry
{
public string ConversationID;
public string ConversationTitle;
public string DialogueEntryID;
public string DialogueEntryTitle;
}
class InvalidConversationTitle : Exception
{
@Evgenus
Evgenus / gist:30980d2e24fa7745bd34
Created September 12, 2014 19:29
gulp-chug output
[22:28:24] Using gulpfile O:\overelay\node-onramp-server\gulpfile.js
[22:28:24] Starting 'default'...
[22:28:24] Starting 'build:browser-relay-client'...master)
[gulp-chug] File is a buffer. Need to write buffer to temp file...
[gulp-chug] Writing buffer to node_modules\browser-relay-client\gulpfile.tmp.1410550104791.js...
[gulp-chug] Spawning process O:\overelay\node-onramp-server\node_modules\browser-relay-client\node_modules\gulp\bin\gulp.js with args O:\overelay\node-onramp-server\node_modules\browser-relay-client\node_modules\gulp\bin\gulp.js --gulpfile gulpfile.tmp.1410550104791.js default from directory O:\overelay\node-onramp-server\node_modules\browser-relay-client...
[gulp-chug](node_modules\browser-relay-client\gulpfile.tmp.1410550104791.js) [22:28:26] Using gulpfile O:\overelay\node-onramp-server\node_modules\browser-relay-client\gulpfile.tmp.1410550104791.js
[gulp-chug](node_modules\browser-relay-client\gulpfile.tmp.1410550104791.js) [22:28:26] Starting 'default'...
[gulp-chug](node_modules\brows
describe("Path merging", () => {
it("Simple data", () => {
var paths: {[name: string]: string[]} = {
"A": ["1", "2", "3", "4", "5"],
"B": ["1", "2", "6", "7", "8"],
"C": ["1", "2", "6", "7"]
};
expect(routing.mergePaths(paths, (s) => s)).to.deep.equal([
{
@Evgenus
Evgenus / test.ts
Created August 28, 2014 12:31
Cross mixin references
class EventEmitter {
public fire(): void {
}
}
//-----------------------------------------------------------------
interface ICanFire {
fire(): void;
}
@Evgenus
Evgenus / cypher.coffee
Created July 4, 2014 17:28
sjcl cypher
sjcl = require("../bower_components/sjcl/sjcl.js")
decrypt = (ciphertext, password, p) ->
salt = sjcl.codec.hex.toBits(p.salt)
iv = sjcl.codec.hex.toBits(p.iv)
ct = sjcl.codec.bytes.toBits(ciphertext)
key = sjcl.misc.pbkdf2(password, salt, p.iter).slice(0, p.ks / 32)
prp = new sjcl.cipher[p.cipher](key)
text = sjcl.mode[p.mode].decrypt(prp, ct, iv, p.auth, p.ts)
return sjcl.codec.utf8String.fromBits(text)
@Evgenus
Evgenus / test.html
Created July 3, 2014 20:02
SJCL hash performance test
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://bitwiseshiftleft.github.io/sjcl/sjcl.js"></script>
<script type="text/javascript">
var c, i, q, sjcl, _i, _j;
c = "7";
@Evgenus
Evgenus / coffee
Created July 2, 2014 11:37
Cakefile
fs = require("fs")
path = require("path")
coffee = require("coffee-script")
uglify = require("uglify-js")
mkdirpSync = require('mkdirp').sync
sass = require('node-sass')
walker = require('fs-walk-glob-rules')
{exec} = require('child_process')
minify = (source) ->
                       |  NTVS  |  TSLS

---------------------------|--------|--------- Show compiler command line | + | - Specify building options | - | + Wraps npm | + | - Generate AMD | - | + Generate CJS | + | + Use node_modules | + | -
Clean sollution [1] | + | - Valid import system [2] | + | -

                     |  NTVS  |  TSLS

-------------------------|--------|--------- Show command | + | - Specify building options | - | + Wraps npm | + | - Generate AMD | - | + Generate CJS | + | + Use node_modules | + | -
Clean sollution [1] | + | - Valid import system [2] | + | -

Явное указание зависимостей

Вариант 1

Указание порядка загрузки модулей которые делают какое-то непотребство (портят window).

depends:
    <rule1>: <rule2>