Skip to content

Instantly share code, notes, and snippets.

View gildegoma's full-sized avatar
💭
Not sure what to do next...

Gilles Cornu gildegoma

💭
Not sure what to do next...
View GitHub Profile
@gildegoma
gildegoma / gist:6389300
Created August 30, 2013 12:19
Add a line on top of files that don't include this header pattern yet
grep -LE '^PATTERN' */filename.ext | xargs -I{} dirname {} | xargs -I{} gsed -i '1s/^/PATTERN with {} dynamic\n/' {}/filename.ext
@gildegoma
gildegoma / issue with perl 5.8 for travis-ci
Created June 18, 2013 09:33
investigating issue with perl 5.8 for travis-ci
Fetching perl 5.8.9 as /home/travis/perl5/perlbrew/dists/perl-5.8.9.tar.bz2
Installing /home/travis/perl5/perlbrew/build/perl-5.8.9 into ~/perl5/perlbrew/perls/5.8
This could take a while. You can run the following command on another shell to track the status:
tail -f ~/perl5/perlbrew/build.perl-5.8.9.log
5.8 is successfully installed.
[2013-06-18T09:14:27+00:00] INFO: bash[installing perl-5.8.9 as 5.8 with Perlbrew arguments: --notest] ran successfully
[2013-06-18T09:14:27+00:00] INFO: Processing bash[preinstall Dist::Zilla via cpanm] action run (perlbrew::multi line 30)
@gildegoma
gildegoma / gist:4108265
Created November 19, 2012 00:02
How to publish a cookbook to opscode community site with knife

$ knife cookbook site share sbt-extras "Programming Languages" -u gildegoma -V

from cloned working copy of opscode/chef-repo with a custom .chef folder that contains your private key and your metadata in knife.rb.

@gildegoma
gildegoma / gist:4036994
Created November 8, 2012 05:26
Chef/Knife cheat sheet

Publish to community.opscode.com

Prerequisites:

  • clone opscode/chef-repo
  • setup .chef/knife.rb (private key file, ...)
  • (on mac, with only vagrant and chef-solo): mkdir /var/chef + chown it... (this is the temporary folder used by knife ... share)

Example:

knife cookbook site share "typesafe-stack" "Programming Languages" -VV -u gildegoma

@gildegoma
gildegoma / gist:4007111
Created November 3, 2012 11:33
VI Cheat Sheet
@gildegoma
gildegoma / gist:1172280
Created August 25, 2011 23:13
Git Branch Management

Rename a local branch

git branch -m <oldname> <newname>

Delete a remote branch

$ git push origin :<branch-simple-name>

Publish a local branch (with remote tracking enabled)

@gildegoma
gildegoma / Comparison.md
Created August 2, 2011 14:12
Comparing Rails 3 with Symfony2, fork and add your suggestions

Rails

Pro

  • Quicker project bootstrapping

Con