Skip to content

Instantly share code, notes, and snippets.

View p5150j's full-sized avatar
🎯
Focusing

Patrick p5150j

🎯
Focusing
View GitHub Profile
@p5150j
p5150j / login.sh
Last active September 25, 2018 19:52
login
curl '[API_URL]/public/login' -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept: application/json, text/plain, */*' --data-binary '{"email":"[email protected]","password":"123456"}'
USE `foo`;
DROP TABLE IF EXISTS `orders`;
-- Order object example
-- "exchangeContractAddress": "0x12459c951127e0c374ff9105dda097662a027093",
-- "maker": "0x9e56625509c2f60af937f23b7b532600390e8c8b",
-- "taker": "0xa2b31dacf30a9c50ca473337c01d8a201ae33e32",
-- "makerTokenAddress": "0x323b5d4c32345ced77393b3530b1eed0f346429d",
-- "takerTokenAddress": "0xef7fff64389b814a946f3e92105513705ca6b990",
token {
address,
symbol
}
market { // a trade place of 2 tokens; a quote token, and a non-quote token
Id // nonQuoteToken.symbol + ‘-’ + quoteToken.symbol
sells: order[],
buys: order[]
}
order *{

Keybase proof

I hereby claim:

  • I am p5150j on github.
  • I am 5150 (https://keybase.io/5150) on keybase.
  • I have a public key ASCLGKpEVxLL6un5_3wfzY95o-0kK41bQ-mY1cPTwkeB-Ao

To claim this, I am signing this object:

Quality

Input
  • videoBitrate (aka bitrate): target average number of bits-by-seconds. The bigger the better for quality, but bigger file size and slower (more cpu). Should be based on size and fps. Recommended: height x width x fps x CONSTANT
  • desiredWidth and desiredHeight (aka size): Should be at 4:3 aspect ratio and even numbers. The bigger the better for quality (as far as bitrate allows it), but slower to encode (more cpu). Recommended: more than 800x600 on desktop recording, less for webcam.
  • desiredFrameRate (aka fps): number of frames per second being encoded. This should not affect frames (pictures) quality, but improves transitions between them. Also makes files bigger and requires proportional CPU, so video_file will start dropping frames when cpu is not enough. Recommended: more than 15 and less than 30.
@p5150j
p5150j / beer.md
Created December 3, 2015 18:16
beer.md

American IPA

##Ingredients:

  • 6 lbs. Maris Otter 2 lbs. Dark Munich (Munich II)
  • 0.5 lb. Crystal 60L
  • 0.5 oz Warrior (15.7% AA) added as a first wort hop when draining into the brew kettle
  • 0.5 oz Amarillo added at 15 minutes left in the boil
  • 0.5 oz Columbus added at 10 minutes left in the boil
Process: nwjs [10070]
Path: /Applications/CommercialTribe.app/Contents/MacOS/nwjs
Identifier: com.nw-builder.nwjs
Version: Version 3.0.8 (3.0.8)
Code Type: X86-64 (Native)
Parent Process: launchd [141]
Responsible: nwjs [10070]
User ID: 501
Date/Time: 2015-11-13 13:29:34.551 -0700
-module(handler_websocket).
-behaviour(cowboy_websocket_handler).
-export([init/3]).
-export([websocket_init/3, websocket_handle/3,
websocket_info/3, websocket_terminate/3]).
-record(state, {
client = undefined :: undefined | binary(),
state = undefined :: undefined | connected | running,
room = undefined :: undefined | integer()
for(var i = 1; i <= 100; i++){
if ( i%3 === 0 && i%5 === 0 ) {
console.log( "FizzBuzz:", i );
} else if ( i%5 === 0 ) {
console.log( "Buzz:", i );
} else if ( i%3 === 0 ) {
console.log( "Fizz:", i );
} else {
console.log( i );
}
$http.get('www.example.com/someapi/resource', {
headers: {'Range': "bytes=1073152-64313343-64313343"}
});
// you will need to make sure your server is able to respond to your request in byte ranges
// example
// more info can be found here http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.16
// GET /BigBuckBunny_320x180.mp4
// Connection: keep-alive
// Accept-Language: en-GB,en-US,en