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
@bjornblissing
bjornblissing / CMakeManifest.txt
Last active July 30, 2024 22:12
CMake script to add manifest to exe-file
# Amend manifest to tell Windows that the application is DPI aware (needed for Windows 8.1 and up)
IF (MSVC)
IF (CMAKE_MAJOR_VERSION LESS 3)
MESSAGE(WARNING "CMake version 3.0 or newer is required use build variable TARGET_FILE")
ELSE()
ADD_CUSTOM_COMMAND(
TARGET ${TARGET_TARGETNAME}
POST_BUILD
COMMAND "mt.exe" -manifest \"${CMAKE_CURRENT_SOURCE_DIR}\\dpiawarescaleing.manifest\" -inputresource:\"$<TARGET_FILE:${TARGET_TARGETNAME}>\"\;\#1 -outputresource:\"$<TARGET_FILE:${TARGET_TARGETNAME}>\"\;\#1
COMMENT "Adding display aware manifest..."
@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