git config --global user.name "XXX" # Full name
git config --global user.email "XXX" # Email
git config --global github.user XXX # Username
git config --global github.token XXX # Token
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
function RactiveExtendTypeScriptClass(tsClass: any): RactiveStatic { | |
var instance = new tsClass(); | |
var r = {}; | |
for (var key in instance) { | |
r[key] = instance[key]; | |
} | |
return Ractive.extend(r); | |
} | |
interface RactiveComponentPlugins { |
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
/*! CSS.supports() Polyfill | |
* https://gist.github.com/codler/03a0995195aa2859465f | |
* Copyright (c) 2014 Han Lin Yap http://yap.nu; MIT license */ | |
if (!('CSS' in window)) { | |
window.CSS = {}; | |
} | |
if (!('supports' in window.CSS)) { | |
window.CSS._cacheSupports = {}; | |
window.CSS.supports = function(propertyName, value) { |
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
/*! Prefix flex for IE10 and Safari / iOS in LESS | |
* https://gist.github.com/codler/2148ba4ff096a19f08ea | |
* Copyright (c) 2014 Han Lin Yap http://yap.nu; MIT license */ | |
.display(@value) when (@value = flex) { | |
display: -ms-flexbox; // IE10 | |
display: -webkit-flex; // Safari / iOS | |
} | |
.display(@value) when (@value = inline-flex) { |
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
/** | |
* Register ajax transports for blob send/recieve and array buffer send/receive via XMLHttpRequest Level 2 | |
* within the comfortable framework of the jquery ajax request, with full support for promises. | |
* | |
* Notice the +* in the dataType string? The + indicates we want this transport to be prepended to the list | |
* of potential transports (so it gets first dibs if the request passes the conditions within to provide the | |
* ajax transport, preventing the standard transport from hogging the request), and the * indicates that | |
* potentially any request with any dataType might want to use the transports provided herein. | |
* | |
* Remember to specify 'processData:false' in the ajax options when attempting to send a blob or arraybuffer - |
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
http://pastie.org/2054699 |
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
['1.0.zip', '1.1.1.zip', '1.1.zip', '1.2.zip'].sort(function(a, b) { console.log('-');console.log(a);console.log(b); return (a.replace('.zip', '') < b.replace('.zip', '')) ? -1 : (a.replace('.zip', '') > b.replace('.zip', '')) ? 1 : 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
package com.ab.jersey.dto; | |
public class AppError { | |
private String message; | |
public AppError() { } | |
public AppError(String message) { | |
this.message = message; | |
} |
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 util = require('util'), | |
net = require('net'); | |
fs = require('fs'); | |
vm = require('vm'); | |
repl = require('repl'); | |
var socket = new net.Socket(); | |
socket.setNoDelay(true); | |
socket.setEncoding('ascii'); |