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
// Template Controller jQuery plug-in | |
// | |
// Contribute : greenlikeorange <beginofalove@hotmail.com> | |
// License : MIT | |
(function(jQuery){ | |
// Template Selector RegExp ${data} | |
var reTmp = /\${([\w\.]+)}/; |
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
<!DOCTYPE html> | |
<html ng-app="ngApp"> | |
<head> | |
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet"> | |
<link href="//cdnjs.cloudflare.com/ajax/libs/foundation/5.0.3/css/normalize.min.css" rel="stylesheet" type="text/css" /> | |
<link href="//cdnjs.cloudflare.com/ajax/libs/foundation/5.0.3/css/foundation.min.css" rel="stylesheet" type="text/css" /> | |
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script> | |
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.14/angular.min.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/foundation/5.0.3/js/foundation.min.js"></script> | |
<meta charset="utf-8"> |
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
<!DOCTYPE html> | |
<html lang='my'> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
body { | |
font-family: Padauk; | |
} |
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
var mongoose = require('mongoose'); | |
var Schema = mongoose.Schema; | |
// Create Simple Post Schema | |
var Post = new Schema({ | |
owner: { type: Schema.Types.ObjectId, ref: 'User' }, | |
createdAt: { type: Date, default: new Date(), required: true }, | |
message: { type: String } | |
}); |
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
var http = require('http'); | |
http.createServer(function(req, res) { | |
var proxy = http.createClient(80, 'http://server2.com') | |
var proxyRequest = proxy.request(request.method, request.url, request.headers); | |
proxyRequest.on('response', function (proxyResponse) { | |
proxyResponse.pipe(response); | |
}); | |
request.pipe(proxyRequest); | |
}).listen(3000); |
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
a(href='/mylink', target='blank') | |
button(onclick='alert("New tab is openning")') Click Me |
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
var b64c = "A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9 + /".split(" "); | |
function cc(number, consonants){ | |
var len = consonants.length, | |
_res = "", | |
_que; | |
while(number>=0){ | |
_que = number%len; | |
_res = consonants[_que] + _res; |
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
var asciiStr = "A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9 + /".split(" "); | |
var my64shortStr = "A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9 - _".split(" "); | |
var ascii2my64 = {}; | |
var my64toascii = {}; | |
for(var i = 0; i < asciiStr.length; i++){ | |
ascii2my64[asciiStr[i]] = my64shortStr[i]; | |
my64toascii[my64shortStr[i]] = asciiStr[i]; | |
} |
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
/** | |
* Knayi-myscript Detection and font tagging script | |
* | |
* Nov 10, 2014 | |
* greenlikeorange<beginofalove@hotmail.com> | |
* | |
* original: | |
* https://github.com/greenlikeorange/knayi-myscript | |
* | |
*/ |
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 CONST (obj, key, value){ | |
Object.defineProperty(obj, key, { | |
enumerable: false, | |
configurable: false, | |
writable: false, | |
value: value | |
}); | |
} |
OlderNewer