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
import qualified Codec.Binary.UTF8.String as UTF8 | |
import qualified Data.Map as M | |
import Graphics.X11.ExtraTypes.XF86 | |
( xF86XK_AudioLowerVolume, | |
xF86XK_AudioMute, | |
xF86XK_AudioRaiseVolume, | |
xF86XK_MonBrightnessDown, | |
xF86XK_MonBrightnessUp, | |
) | |
import System.Exit (ExitCode (ExitSuccess), exitWith) |
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
func CreatePDFFromHTML(inputHTML []byte) ([]byte, error) { | |
dirName, err := ioutil.TempDir("", "pdf-generator") | |
if err != nil { | |
return nil, err | |
} | |
// remove this and log the dirName if you need to debug the HTML | |
defer os.RemoveAll(dirName) | |
// log.Println(dirName) |
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 | |
type Server struct { | |
shutdown chan struct{} | |
close chan struct{} | |
} | |
func NewServer() *Server { | |
s := &Server{ | |
shutdown: make(chan struct{}, 0), |
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
#!/bin/bash | |
## Last modified 2016-12-09 - Just Add Power | |
## Sets the 3G Receiver to operate as a fully functional 3G device | |
## Once applied the 3G unit will reboot and ONLY be compatible with other 3G units in 3G mode | |
astparam s soc_op_mode 3 | |
astparam s remote_edid_patch 00000001 | |
astparam save | |
echo '/usr/local/bin #' | |
sleep 5 | |
reboot |
I hereby claim:
- I am fortytw2 on github.
- I am fortytw2 (https://keybase.io/fortytw2) on keybase.
- I have a public key whose fingerprint is 30CE 29C8 C62F E18E D789 8D41 9FE0 138C 1DDD 46B8
To claim this, I am signing this object:
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
# vim:ft=zsh ts=2 sw=2 sts=2 | |
# | |
# agnoster's Theme - https://gist.github.com/3712874 | |
# A Powerline-inspired theme for ZSH | |
# | |
# # README | |
# | |
# In order for this theme to render correctly, you will need a | |
# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts). | |
# Make sure you have a recent version: the code points that Powerline |
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
// Copyright 2013 The Go Authors. All rights reserved. | |
// Use of this source code is governed by a BSD-style | |
// license that can be found in the LICENSE file. | |
// Package leaktest provides tools to detect leaked goroutines in tests. | |
// To use it, call "defer util.LeakTest(t)()" at the beginning of each | |
// test that may use goroutines. | |
// copied out of the cockroachdb source tree | |
package util |
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 ( | |
"log" | |
"os" | |
"os/signal" | |
"sync" | |
"syscall" | |
"time" | |
) |
NewerOlder