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
| package main | |
| import ( | |
| "github.com/kardianos/service" | |
| "log" | |
| "flag" | |
| ) | |
| type Service struct {} |
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
| puts "Hello from Gist" |
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
| module Base16 | |
| def self.strict_encode16(s) | |
| s.unpack1('H*') | |
| end | |
| def self.strict_decode16(s) | |
| [s].pack('H*') | |
| end | |
| end |
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
| # 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 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
| #!/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 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
| require 'ostruct' | |
| require 'benchmark' | |
| COUNT = 10_000_000 | |
| NAME = "Test Name" | |
| EMAIL = "test@example.org" | |
| class Person | |
| attr_accessor :name, :email | |
| end |
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
| ### UPDATE: ruby-debuy19 is no longer maintained, use https://github.com/cldwalker/debugger | |
| # Install with: | |
| # bash < <(curl -L https://raw.github.com/gist/1333785) | |
| # | |
| # Reference: http://blog.wyeworks.com/2011/11/1/ruby-1-9-3-and-ruby-debug | |
| echo "Installing ruby-debug with ruby-1.9.3-p0 ..." | |
| curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem |
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
| [ | |
| { | |
| "target": "timeShift(player_data.vod.player._metrics.audience, -10min)", | |
| "datapoints": [ | |
| [ | |
| 83739, | |
| 1532055000 | |
| ] | |
| ] | |
| } |
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
| require 'formula' | |
| class Ffmpeg < Formula | |
| homepage 'http://ffmpeg.org/' | |
| url 'http://ffmpeg.org/releases/ffmpeg-2.0.1.tar.bz2' | |
| sha1 'cc36c696228221ce14585edd90fb6413d206a5c8' | |
| head 'git://git.videolan.org/ffmpeg.git' | |
| option "without-x264", "Disable H.264 encoder" |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <!--Created with Unified Streaming Platform(version=1.4.57)--> | |
| <SmoothStreamingMedia | |
| MajorVersion="2" | |
| MinorVersion="0" | |
| TimeScale="10000000" | |
| Duration="3022933333"> | |
| <StreamIndex | |
| Type="audio" | |
| QualityLevels="1" |
NewerOlder