- TypeScript 1.5 http://www.typescriptlang.org/
- WebPack http://webpack.github.io/
- awesome-typescript-loader https://github.com/s-panferov/awesome-typescript-loader
- DefinitelyTyped http://definitelytyped.org/
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/sh | |
# This is a skeleton of a bash daemon. To use for yourself, just set the | |
# daemonName variable and then enter in the commands to run in the doCommands | |
# function. Modify the variables just below to fit your preference. | |
daemonName="DAEMON-NAME" | |
pidDir="." | |
pidFile="$pidDir/$daemonName.pid" |
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
{ | |
"version": "0.1.0", | |
"command": "gulp", | |
"isShellCommand": true, | |
"args": [ | |
"--no-color" | |
], | |
"tasks": [ | |
{ | |
"taskName": "scripts", |
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
@mixin triangle($width, $dir, $color) { | |
@if $dir == up { | |
width: 0; | |
height: 0; | |
border-left: $width/2 solid transparent; | |
border-right: $width/2 solid transparent; | |
border-bottom: $width/2 solid $color; | |
} @else if $dir == down { | |
width: 0; | |
height: 0; |
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
module.exports = function(grunt) { | |
grunt.initConfig({ | |
concat: { | |
'dist/all.js': ['src/*.js'] | |
}, | |
uglify: { | |
'dist/all.min.js': ['dist/all.js'] | |
}, | |
jshint: { | |
files: ['gruntfile.js', 'src/*.js'] |
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
// Extended answer: http://stackoverflow.com/questions/11873570/angularjs-for-loop-with-numbers-ranges/17124017#17124017 | |
// By caching the function result, it can become orders of magnitudes more efficient (depending on how big the range is) | |
// jsPerf: http://jsperf.com/memoizer-range/9 | |
$scope.range = (function() { | |
var cache = {}; | |
return function(min, max, step) { | |
var isCacheUseful = (max - min) > 70; | |
var cacheKey; |
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
it('should have expandable groups', fakeAsync(() => { | |
const tbody = fixture.debugElement.query(By.css('tbody')); | |
const rows = tbody.children; | |
const rowsInitialCount = tbody.children.length; | |
// Emit click on first group | |
tbody.query(By.css('td.events__collapse')).nativeElement.click(); | |
fixture.detectChanges(); | |
tick(1500); |
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
<?php | |
class ExampleTest extends TestCase { | |
public function setUp() | |
{ | |
parent::setUp(); | |
DB::beginTransaction(); | |
} |
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
// angular | |
import {Component, ViewEncapsulation} from '@angular/core'; | |
declare var Reflect: any; | |
const _reflect: any = Reflect; | |
// Usage: | |
// @BaseComponent({ etc... }) | |
export function BaseComponent(metadata: any = {}) { |
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
#include <stdio.h> | |
#include <windows.h> | |
typedef int (WINAPI *FUNC)(PCWSTR,PCWSTR); | |
int main() | |
{ | |
HMODULE hmod; | |
FUNC func; | |
OlderNewer