- Optional static typing
- Classes
- Inheritence
- Interfaces
- Visibility
- Accessors
- Namespaces
- Modules
- Type inference - stay dynamic
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
declare module 'hot-shots' { | |
interface ClientOptions { | |
host?: string; | |
port?: number | string; | |
} | |
class StatsDClient { | |
constructor(options?: ClientOptions); | |
increment(stat: string); | |
increment(stat: string | string[], value: number, sampleRate: number, tags: string[], callback: Function); |
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
git_author() { | |
if [ -z "$GIT_AUTHOR_NAME" ]; then | |
echo "developer" | |
else | |
echo "$GIT_AUTHOR_NAME" | |
fi | |
} | |
hitch() { | |
command hitch "$@" |
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
ssh $1 -Y -t 'export DISPLAY=:0.0 | |
xdotool key --window "$(xdotool search --onlyvisible --class chromium | head -n 1)" F5' |
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) { | |
var datas = []; | |
req.on('data', function (data) { | |
datas.push(data); | |
}); | |
req.on('end', function () { | |
console.log('>-------------------->'); | |
console.log(new Date); | |
console.log(req.method + " " + req.url); |
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
DECLARE @s VARCHAR(8000) | |
SELECT @s = COALESCE(@s + ',', '') + '@Thing' + CONVERT(nvarchar,[number]) | |
FROM [master].[dbo].[spt_values] | |
WHERE [name] is null and [number] between 0 and 197 | |
SELECT @s |
Immortalised on my blog here: http://www.codesleuth.co.uk/2016/01/Semantic-UI-Template-for-Paginate-Almost-anything/
This is a template for Paginate (Almost) Anything using Semantic UI. The original dirPagination.tpl.html is written with bootstrap themes.
<div class="ui pagination menu" ng-if="1 < pages.length || !autoHide">
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 readline = require('readline') | |
var fs = require('fs') | |
var stream = require('stream') | |
var util = require('util') | |
var Transform = stream.Transform | |
var iconv = require('iconv-lite'); | |
function CSVer(options) { | |
this.line = '' |