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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Net; | |
using System.Reactive.Linq; | |
using System.Text; | |
using System.Web; | |
using Newtonsoft.Json; |
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 start = Observable.FromEvent<EventArgs>(btnStart, "Click"); | |
var stop = Observable.FromEvent<EventArgs>(btnStop, "Click"); | |
var keyDown = Observable.FromEvent<KeyEventArgs>(txtMainText, "KeyDown") | |
.Select(x => x.EventArgs) | |
.SkipUntil(start) | |
.TakeUntil(stop) | |
.Repeat() //this will start skiping again after stop was raised. | |
.Where(x => | |
{ |
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
#aliases | |
git config --global alias.tree 'log --oneline --abbrev-commit --all --graph --decorate' | |
#view the history of the repo | |
git log --oneline --abbrev-commit --all --graph --decorate | |
#view whitespace issues. | |
git diff --check | |
#common flow |
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 app = connect() | |
.use(function(req,res,next){ | |
buffer = httpProxy.buffer(req); | |
next(); | |
}) | |
.use(connect["static"](process.cwd())) | |
.use(function(req, res){ | |
//alter request here. | |
req.headers["host"] = host; |
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 https = require('https'); | |
var fs = require('fs'); | |
var crypto = require("crypto"); | |
var options = { | |
SNICallback: function (hostname) { | |
console.log('hostname: ' + hostname); | |
return crypto.createCredentials({ | |
key: fs.readFileSync('default.key'), | |
cert: fs.readFileSync('default.crt') |
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
PS D:\apache\bin> .\ab.exe -n 100 http://one.org:3000/ | |
This is ApacheBench, Version 2.3 <$Revision: 1373084 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking one.org (be patient).....done | |
Server Software: | |
Server Hostname: one.org |
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 util = require('util'), | |
EventEmitter = require('events').EventEmitter; | |
var MyClass = function () { | |
if (!(this instanceof MyClass)) return new MyClass(); | |
EventEmitter.call(this); | |
}; |
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
### | |
Include database config. | |
@var [Object] db | |
@api private | |
### | |
### | |
Set users collection |
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 express = require('express'); | |
var app = express(); | |
app.get('/', function (req, res, next) { | |
next({ status: 403, message: 'this is forbidden'}); | |
}); | |
app.use(function (err, req, res, next) { | |
res.send(err.status || 500, err.message || "something broke"); | |
}); |
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
"use strict"; | |
import React from "react-native"; | |
let { | |
StyleSheet, | |
View, | |
ScrollView, | |
PropTypes, | |
Component, | |
Text |
OlderNewer