Skip to content

Instantly share code, notes, and snippets.

View inlife's full-sized avatar
馃嚭馃嚘
Be Mighty

Vladyslav Hrytsenko inlife

馃嚭馃嚘
Be Mighty
View GitHub Profile
@adis-io
adis-io / webhook.js
Last active August 8, 2017 02:20
Github's webhook handling with nodejs + restify
var restify = require('restify'),
crypto = require('crypto');
var secret = "my-app-secret";
function payload(req, res, next) {
getRawBody(req, {
length: req.headers['content-length'],
limit: '2mb',
encoding: 'utf-8'
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten