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
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
// choose either `'stable'` for receiving highly polished, | |
// or `'canary'` for less polished but more frequent updates | |
updateChannel: 'stable', |
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 type SHOW = { | |
type t | |
let show: t => string | |
}; | |
type show_impl('a) = (module SHOW with type t = 'a) | |
module Show_int: SHOW with type t = int = { | |
type t = int; | |
let show = string_of_int |
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
const rules = [ | |
{ type: 'space', regex: /^\s/ }, | |
{ type: 'lParen', regex: /^\(/ }, | |
{ type: 'rParen', regex: /^\)/ }, | |
{ type: 'number', regex: /^[0-9\.]+/ }, | |
{ type: 'string', regex: /^".*?"/ }, | |
{ type: 'variable', regex: /^[^\s\(\)]+/ } // take from the beginning 1+ characters until you hit a ' ', '(', or ')' // TODO - support escaped double quote | |
]; | |
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
https://www.youtube.com/watch?v=iumlHzoVlJM | |
class Perceptron { | |
constructor (x_train, y_train, epochs=1000, learn_rate= 0.1) { | |
// used to generate percent accuracy | |
this.accuracy = 0 | |
this.samples = 0 | |
this.x_train = x_train |
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
Windows.10.and.Office.2016.gVLK | |
##################################################################### | |
# Install/Uninstall keys # | |
##################################################################### | |
1.) Uninstall the current product by entering the “uninstall product key” extension: | |
slmgr.vbs /upk | |
2.) Install the key that you obtained above for “Windows Srv 2012R2 DataCtr/Std KMS for Windows 10” |
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
launchctl unload /System/Library/LaunchDaemons/com.apple.nsurlstoraged.plist | |
launchctl unload /System/Library/LaunchAgents/com.apple.nsurlsessiond.plist | |
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.nsurlsessiond.plist | |
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.nsurlstoraged.plist |
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
import { bootstrap, Request, Response, MongooseFactory, Injectable } from './library' | |
@Injectable() | |
class UserModel { | |
private model | |
constructor(modelFactory: MongooseFactory) { | |
this.model = modelFactory.createModel('users', mongoose.Schema({ | |
name: 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
interface MaybePattern<A, B> { | |
Just: (a: A) => B, | |
Nothing: () => B | |
} | |
class Maybe<A> { | |
static of<A>(a: A): Maybe<A> { | |
return a ? new Just(a) : new Nothing() |
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
// preserved from my comment in this issue: https://github.com/Microsoft/TypeScript/issues/165#issuecomment-259598080 | |
interface Type<T> { new(...args): T } | |
interface CaseResult<R> { | |
success: boolean; | |
result: R; | |
} | |
interface CaseFn<R> { (value: any): CaseResult<R> } |
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
# Assumming we have 3 nodes | |
NODE1=10.0.1.1 | |
NODE2=10.0.1.2 | |
NODE3=10.0.1.3 | |
# Configure the server | |
ssh root@NODE1 apt-get install -y glusterfs-server | |
ssh root@NODE2 apt-get install -y glusterfs-server | |
ssh root@NODE3 apt-get install -y glusterfs-server | |
ssh root@NODE1 gluster peer probe NODE2 |