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
Schema: map[string]*schema.Schema{ | |
"addon": { | |
Type: schema.TypeString, | |
Required: true, | |
ForceNew: true, | |
}, | |
"app": { | |
Type: schema.TypeString, | |
Required: true, |
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 | |
type Options struct { | |
Input string | |
Output string | |
Switch bool | |
} | |
func parseFlags(options *Options) { | |
flag.StringVar(&options.Input, "", "input file") |
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
// The exercism "Leap" program in Kitten | |
// http://exercism.io/exercises/ruby/leap/readme | |
// http://kittenlang.org/ | |
1996 isLeapYear "1996 is a leap year" assert | |
1997 isLeapYear "1997 is not a leap year" refute | |
1998 isLeapYear "1998 is not a leap year" refute | |
1900 isLeapYear "1900 is not a leap year" refute | |
1800 isLeapYear "1800 is not a leap year" refute | |
2400 isLeapYear "2400 is a leap year" assert |
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 | |
while true; do | |
battery=`cat /sys/class/power_supply/BAT0/capacity` | |
time=`date +"%H:%M"` | |
xsetroot -name "${battery}% | ${time}" | |
sleep 30 | |
done |
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 | |
# | |
# DEPENDENCIES: | |
# bynanz | |
# xdotool | |
echo | dmenu -p "Enter to set X/Y start" | |
eval $(xdotool getmouselocation --shell) | |
STARTX=$X |
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
diff --git a/inputrc b/inputrc | |
index c9d1b79..36d91cd 100644 | |
--- a/inputrc | |
+++ b/inputrc | |
@@ -2,3 +2,7 @@ | |
"\e[B": history-search-forward | |
"\C-p": history-search-backward | |
"\C-n": history-search-forward | |
+"\e[A": "" | |
+"\e[B": "" |
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
begin | |
require 'bundler/inline' | |
rescue LoadError => e | |
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' | |
raise e | |
end | |
gemfile(true) do | |
source 'https://rubygems.org' | |
# Activate the gem you are reporting the issue against. |
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 << self | |
alias mess_with_bernerd define_method | |
end | |
eval(<<-EOS) | |
mess_with_bernerd(:foo) do | |
puts "but can you handle string eval???" | |
end | |
mess_with_bernerd(:bar) do |
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 << self | |
alias mess_with_bernerd define_method | |
end | |
mess_with_bernerd(:foo) do | |
# | |
# | |
# | |
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
" clone github.com/fatih/vim-go into /tmp, and run vim | |
" with `vim -u path-to-this-file` to test out the plugin. | |
set nocompatible | |
syntax on | |
filetype plugin indent on | |
" add vim-go plugin to runtime path | |
set rtp+=/tmp/vim-go |
NewerOlder