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
package main | |
import ( | |
"github.com/kardianos/service" | |
"log" | |
"flag" | |
) | |
type Service struct {} |
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 Base16 | |
def self.strict_encode16(s) | |
s.unpack1('H*') | |
end | |
def self.strict_decode16(s) | |
[s].pack('H*') | |
end | |
end |
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
# Ruby base16 encode/decode | |
# (c) Sascha Spreitzer, 2016 | |
# MIT license | |
def b16decode(what) | |
chars = '' | |
ret = '' | |
what.each_char do |c| | |
chars += c | |
if chars.size == 2 |
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
#!/usr/bin/env bash | |
set -e | |
addEntries() { | |
# check if universal access / custom menu key exists | |
if defaults read com.apple.universalaccess com.apple.custommenu.apps > /dev/null 2>&1; then | |
defaults delete com.apple.universalaccess com.apple.custommenu.apps | |
fi |
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
require 'ostruct' | |
require 'benchmark' | |
COUNT = 10_000_000 | |
NAME = "Test Name" | |
EMAIL = "[email protected]" | |
class Person | |
attr_accessor :name, :email | |
end |
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
[ | |
{ | |
"target": "timeShift(player_data.vod.player._metrics.audience, -10min)", | |
"datapoints": [ | |
[ | |
83739, | |
1532055000 | |
] | |
] | |
} |
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
require 'formula' | |
class Tinyproxy < Formula | |
homepage "https://www.banu.com/tinyproxy/" | |
url "https://www.banu.com/pub/tinyproxy/1.8/tinyproxy-1.8.3.tar.bz2" | |
sha1 "2538fbd190d3dc357a2e7c2a07ea0fbefb768a13" | |
head do | |
url "https://github.com/dx7/tinyproxy.git", :branch => "1.8" | |
depends_on "autoconf" => :build |
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
source :rubygems | |
# We are not loading Active Record, nor Active Resources etc. | |
# We can do this in any app by simply replacing the rails gem | |
# by the parts we want to use. | |
gem "actionpack", "~> 4.0" | |
gem "railties", "~> 4.0" | |
gem "tzinfo" | |
# Let's use thin |
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
require 'formula' | |
class MediaInfo < Formula | |
homepage 'http://mediainfo.sourceforge.net' | |
url 'http://mediaarea.net/download/binary/mediainfo/0.7.67/MediaInfo_CLI_0.7.67_GNU_FromSource.tar.bz2' | |
version '0.7.67' | |
# sha1 'e5bfc3af8d3a0995785f1963c78ff9a6505e9626' | |
sha1 'e4b939c7d04ba52be679bcfd577905b65f6c72c6' | |
head 'svn://svn.code.sf.net/p/mediainfo/code' |
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
/* | |
* This has been tuned to generate reasonable code on the vax using pcc. | |
*/ | |
#define __sputc(c, p) \ | |
(--(p)->_w < 0 ? \ | |
(p)->_w >= (p)->_lbfsize ? \ | |
(*(p)->_p = (c)), *(p)->_p != '\n' ? \ | |
(int)*(p)->_p++ : \ | |
__swbuf('\n', p) : \ | |
__swbuf((int)(c), p) : \ |
NewerOlder