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
## Sublime Text 3 Serial key build is 3176 | |
> * Added these lines into /etc/hosts | |
127.0.0.1 www.sublimetext.com | |
127.0.0.1 license.sublimehq.com | |
> * Used the license key | |
----- BEGIN LICENSE ----- |
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
# create an account, create an app | |
# @see https://apps.twitter.com/ | |
# retrieve the access tokens | |
# @see https://dev.twitter.com/oauth/reference/post/oauth2/token | |
# create the file ~/twitter_api | |
nano ~/twitter_api | |
Authorization: OAuth oauth_consumer_key="XXXXXX", oauth_nonce="11111111", oauth_signature="XXXXXX", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1450728725", oauth_token="99999-XXXXXX", oauth_version="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
//Usage | |
import React from 'react'; | |
import { BrowserRouter as Router } from 'react-router-dom'; | |
import Route from './AuthRoute'; | |
import Login from './Login'; | |
import Private from './Private'; | |
export default () => | |
<Router> |
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
Result.Content.Headers.Add("Content-Disposition", "attachment; filename=" + FileName); | |
Result.Content.Headers.Add("Access-Control-Expose-Headers", "filename"); | |
Result.Content.Headers.Add("filename", FileName); |
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
<md-select class="md-select-custom-style" name="datasourcetype" placeholder="Data Source Type" [(ngModel)]="dataSource.dataSourceTypeId"> | |
<md-option *ngFor="let dsType of dataSourceTypes" [value]="dsType.dataSourceTypeId">{{ dsType.name }}</md-option> | |
</md-select> |
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
<form #heroForm="ngForm" *ngIf="active" (ngSubmit)="onSubmit()"> | |
<div class="form-group"> | |
<label for="name">Name</label> | |
<input type="text" id="name" class="form-control" | |
required minlength="4" maxlength="24" | |
name="name" [(ngModel)]="hero.name" | |
#name="ngModel" > | |
<div *ngIf="name.errors && (name.dirty || name.touched)" | |
class="alert alert-danger"> | |
<div [hidden]="!name.errors.required"> |
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
// Format conversions | |
get _startDate() { | |
if (this.startDate) { | |
let d = new Date(this.startDate); | |
return d.toLocaleDateString(); | |
} | |
return ''; |
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
export class Person { | |
name : string; | |
age: number; | |
fillFromJson(json: any) { | |
for (var propName in json) { | |
this[propName] = json[propName] | |
} |
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
/* | |
chunk array elements | |
*/ | |
function chunckArray(arr,chunkSize) { | |
return arr.map( function(e,i){ | |
return i%chunkSize===0 ? arr.slice(i,i+chunkSize) : null; | |
}) | |
.filter(function(e){ return e; }); |
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
console.log(1); | |
(_ => console.log(2))(); | |
eval('console.log(3);'); | |
console.log.call(null, 4); | |
console.log.apply(null, [5]); | |
new Function('console.log(6)')(); | |
Reflect.apply(console.log, null, [7]) | |
Reflect.construct(function(){console.log(8)}, []); | |
Function.prototype.apply.call(console.log, null, [9]); | |
Function.prototype.call.call(console.log, null, 10); |