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 ( | |
"fmt" | |
"sync" | |
) | |
func main() { | |
// Create our stream of ints up to the threshold | |
// This channel is closed by the generate goroutine |
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
### Keybase proof | |
I hereby claim: | |
* I am geoffgarside on github. | |
* I am geoffgarside (https://keybase.io/geoffgarside) on keybase. | |
* I have a public key ASDcl8vtsaJfBRxCTO2u1zhKNs9M3cCs4e2CoV1fZg0r2go | |
To claim this, I am signing this object: |
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 powershell | |
param ( [String]$InputFile, [String]$OutputFile, [String]$Password="pa55w0rd" ) | |
$InputStream = New-Object IO.FileStream($InputFile, | |
[IO.FileMode]::Open, [IO.FileAccess]::Read) | |
$OutputStream = New-Object IO.FileStream($OutputFile, | |
[IO.FileMode]::Create, [IO.FileAccess]::Write) | |
# Read the Salt |
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
class SphinxAT206 < Formula | |
homepage 'http://www.sphinxsearch.com' | |
url 'http://sphinxsearch.com/files/sphinx-2.0.6-release.tar.gz' | |
sha256 'de943c397efda706661b3a12e12e9f8cc8a03bf6c02c5a6ba967a06384feede2' | |
head 'http://sphinxsearch.googlecode.com/svn/trunk/' | |
option 'mysql', 'Force compiling against MySQL' | |
option 'pgsql', 'Force compiling against PostgreSQL' | |
option 'id64', 'Force compiling with 64-bit ID support' |
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
--- | |
hosts: server | |
tasks: | |
- name: create my.cnf file | |
copy: > | |
src=my.cnf dest=/var/db/mysql/my.cnf | |
owner=mysql group=mysql mode=0644 | |
force=no | |
- name: configure my.cnf |
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
#!/bin/sh | |
# | |
# PROVIDE: gitlab_ci_runner | |
# REQUIRE: networking syslog | |
# KEYWORD: shutdown | |
. /etc/rc.subr | |
name="gitlab_ci_runner" | |
rcvar="${name}_enable" |
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
(function() { | |
/* First try to handle pages which are actually raw text of the email. | |
Extract the HTML part and replace page with it */ | |
var orig_html = document.getElementsByTagName('html')[0].textContent; | |
var extracted_html = orig_html; | |
/* Try splitting it up if it's actually the multipart email. Otherwise, work | |
on the document itself, leaving the orig_html in place */ | |
var boundary_pattern = '--==============='; | |
while (extracted_html.indexOf(boundary_pattern) != -1) { | |
var next_boundary = extracted_html.indexOf(boundary_pattern); |
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
--- | |
thing_server: 192.168.0.88 | |
client_thing::thing_server: "%{hiera('thing_server')}" | |
other_thing::thing_server: "%{hiera('thing_server')}" |
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
redis-cli --raw --scan --pattern "*" | awk '{ printf("*2\r\n$3\r\nDEL\r\n$%d\r\n%s\r\n", length($0), $0); }' > tmpfile.txt | |
cat tmpfile.txt | redis-cli --pipe |
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 ruby | |
INPUT_DIR = '/var/spool/exim/input/' | |
AUTH_ID = '-auth_id ' | |
auth_id = ARGV[0] | |
if auth_id.nil? || auth_id == "" | |
puts "Usage: #{$0} auth_id" | |
exit |
NewerOlder