Skip to content

Instantly share code, notes, and snippets.

View aespinosa's full-sized avatar

Allan Espinosa aespinosa

View GitHub Profile
time ruby -rbundler/setup test/isolated_test.rb -v
Run options: -v --seed 18077
# Running:
IsolatedTest#test_default = 0.00 s = .
Finished in 0.004037s, 247.7322 runs/s, 495.4644 assertions/s.
1 runs, 2 assertions, 0 failures, 0 errors, 0 skips
@aespinosa
aespinosa / gist:9027913
Created February 16, 2014 01:27
windows_feature resources not compiling properly in a chefspec run.
aspnet_skeleton::default
================================================================================
Recipe Compile Error in /tmp/d20140216-3013-1to7s1t/aspnet_skeleton/recipes/default.rb
================================================================================
TypeError
---------
nil is not a symbol
@aespinosa
aespinosa / gist:6097207
Created July 28, 2013 03:09
lxc_container[] resources breaks on Chef 11.6.0
Compiling Cookbooks...
[2013-07-28T02:52:13+00:00] INFO: Lxc light-weight provider already initialized -- overriding!
================================================================================
Recipe Compile Error in /tmp/vagrant-chef-1/chef-solo-1/cookbooks/lxc/resources/container.rb
================================================================================
NameError
---------
@aespinosa
aespinosa / gist:5475294
Created April 28, 2013 00:21
fulll debug log
INFO global: Vagrant version: 1.2.2
DEBUG global: Loading core plugin: C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/box/plugin.rb
INFO manager: Registered plugin: box command
DEBUG global: Loading core plugin: C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/destroy/plugin.rb
INFO manager: Registered plugin: destroy command
DEBUG global: Loading core plugin: C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/halt/plugin.rb
INFO manager: Registered plugin: halt command
DEBUG global: Loading core plugin: C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/init/plugin.rb
INFO manager: Registered plugin: init command
DEBUG global: Loading core plugin: C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/package/plugin.rb
sed "s/\[^[[0-9;]*[a-zA-Z]//gi"
@aespinosa
aespinosa / .screenrc
Last active October 13, 2015 00:27
personal .screenrc
shell -$SHELL
#shelltitle 'sometitle'
defscrollback 100000
# Remove some stupid / dangerous key bindings
bind .
bind ^\
bind \\
bind ^h
bind h
@aespinosa
aespinosa / Vagrantfile
Created May 12, 2012 03:29
Removed group and other user writable flag on Windows
# vi: set ft=ruby :
Vagrant::Config.run do |config|
config.vm.share_folder "v-root", "/vagrant", ".", extra: "umask=022"
end
@aespinosa
aespinosa / mendeley.xml
Created May 7, 2012 19:32
Mendeley Opensearch plugin. Install using 'window.external.AddSearchProvider("https://raw.github.com/gist/2629861/1b53261df1a907f26b36a84441d656035945f430/mendeley.xml")' from a DOM console
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"
xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<!-- Created on Mon, 07 May 2012 19:29:45 GMT -->
<ShortName>Mendeley</ShortName>
<Description>Mendeley</Description>
<Url type="text/html" method="get" template="http://www.mendeley.com/research-papers/search/?query={searchTerms}"/>
<Image width="16" height="16">http://www.mendeley.com/favicon.ico</Image>
<Developer>Allan Espinosa</Developer>
<InputEncoding>UTF-8</InputEncoding>
@aespinosa
aespinosa / gist:2303748
Created April 4, 2012 16:48
Notes: R engineering notation
# Tip from an email in: http://tolstoy.newcastle.edu.au/R/help/06/07/30469.html
formatEng <- function(x) {
s<-as.numeric(strsplit(format(x, scientific=T),"e")[[1]])
return(paste(s[1]*10^(s[2]%%3),as.integer(s[2]-(s[2]%%3)),sep="e"))
}
# Use with sapply on dataframe elements
sapply(x$col, formatEng)
@aespinosa
aespinosa / gist:2303196
Created April 4, 2012 15:58
Idea: system ctags
Instead of the long ctags generation on the entire /usr/include . Filter out the libc headers first. Just add as you need based on the *-dev package list.