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
log_level :info | |
log_location STDOUT | |
node_name 'admin' | |
client_key | |
'/home/vagrant/work/.chef/admin.pem' | |
validation_client_name 'chef-validator' | |
validation_key '/etc/chef-server/chef-validator.pem' | |
chef_server_url 'https://chef-server:443' | |
syntax_check_cache_path '/home/vagrant/work/.chef/syntax_check_cache' |
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(fake_gen). | |
-export([ | |
pop/1, | |
push/2, | |
start/0, | |
start2/0, | |
server_loop2/1 | |
]). |
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
library("lattice") | |
z <- read.table("all.txt", colClasses=rep("integer", 4)) | |
names(z) <- c("pg_rand", "pg_rand_os", "u_rand", "u_rand_os") | |
all <- stack(z) | |
names(all) <- c("item", "func") | |
tapply(all$item, all$func, table) | |
histogram(~item|func, data=all, type="count", breaks=0:50) |
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
DEPS = $(CURDIR)/deps | |
DIALYZER_OPTS = -Wunderspecs | |
# List dependencies that should be included in a cached dialyzer PLT file. | |
# DIALYZER_DEPS = deps/app1/ebin \ | |
# deps/app2/ebin | |
DEPS_PLT = {{name}}.plt |
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
Let's actually see what's going on. Change client to send via this "tunnel": | |
socat -v TCP4-LISTEN:9898,fork TCP4:localhost:5678 | |
> 2012/09/06 14:05:24.413264 length=5 from=0 to=4 | |
hello | |
This confirms that sending <<>> is, eventually, a nop in the sense of no data sent over the wire. But it takes a number of function calls to not send anything. | |
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 seems to work as well and is more general. It was slow on | |
;; first load, then pretty snappy. Worked for mail and chrome | |
(require 'org-mac-link-grabber) | |
(add-hook 'org-mode-hook | |
(lambda () | |
(define-key org-mode-map (kbd "C-c g") 'omlg-grab-link))) |
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
Hi. |
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 Chef::EncryptedDataBagItem | |
def [](key) | |
value = @enc_hash[key] | |
if key == "id" || value.nil? | |
value | |
else | |
self.class.decrypt_value(value, @secret) | |
end | |
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
# Borrowed heavily from http://github.com/atmos/cinderella | |
username = node[:login_name] || node[:current_user] | |
user_uid = node[:etc][:passwd][username]["uid"] | |
user_gid = node[:login_group] | |
DEFAULT_RUBY_VERSION = "1.8.7-p302" | |
rvm_init = 'source "$HOME/.rvm/scripts/rvm"' |
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
term_special_chars_test_() -> | |
SpecialChars = ["!", "(", ")", "{", "}", "[", "]", | |
"^", "\"", "~", "*", "?", ":", "\\"], | |
Formats = ["foo~sbar", "~sb", "a~s", "a~sb"], | |
Terms = [ ?i2b(io_lib:format(F, ["\\" ++ C])) || | |
F <- Formats, C <- SpecialChars ], | |
[ ?_assertEqual(T, hd(lucene:parse(T))) || T <- Terms ]. |
NewerOlder