Skip to content

Instantly share code, notes, and snippets.

View foliea's full-sized avatar

Adrien Folie foliea

  • Paris, France
View GitHub Profile
@foliea
foliea / hello
Last active August 29, 2015 14:14
Groundify Demo
This gist is not runnable, groundify can't figure out
its language.
foliea: ~/Applications/dotfiles $ sudo gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
gpg: requesting key D39DC0E3 from hkp server keys.gnupg.net
gpg: key D39DC0E3: "Michal Papis (RVM signing) <[email protected]>" not changed
gpg: Total number processed: 1
gpg: unchanged: 1
// This tests seems to be redundant with docker module tests
/* context('when called with wrong docker endpoint', function() {*/
//beforeEach(function() {
//var invalidEndpoint = endpointHTTP.replace('http', 'ftp');
//cli.argv(['node', 'server', '-e', invalidEndpoint], fakeExit);
//});
//expectToLogError(fakeDocker.ErrorInvalidEndpoint);
//expectProgramToFail();
  1. Add upstream repo:

    git remote add upstream https://github.com/grounds/grounds.io.git
    
  2. Start rebasing

    git fetch upstream
    git rebase -i upstream/master
    
module ApplicationHelper
def title(title)
content_for(:title, title)
end
def gravatar_tag(email, options={})
id = Digest::MD5::hexdigest(email).downcase
size = options[:size] || 128
image_tag("https://secure.gravatar.com/avatar/#{id}?s=#{size}", options)
end
@foliea
foliea / CodeEditor.js
Last active August 29, 2015 14:10
react test
var CodeEditor = React.createClass({
componentDidMount: function () {
this.editor = ace.edit(this.getDOMNode());
this.editSession = this.editor.getSession();
this.setLanguage(this.props.language);
this.setTheme(this.props.theme);
this.focus();
this.editor.on('blur', function () {
name = :adrien
puts name.object_id
@foliea
foliea / Dockerfile
Last active August 29, 2015 14:07
Docker: cache tips
FROM ubuntu:14.04
# Set ruby version.
ENV RUBY_MAJOR 2.1
ENV RUBY_MINOR 2.1.2
# Set app's location.
ENV APP /rails
# Add user dev.
@foliea
foliea / gist:5081df06ba34dbf5ad08
Created October 15, 2014 14:17
Test refactor
var ruby = utils.multiline(function() {/*
puts "Hello world"
*/});
var golang = utils.multiline(function() {/*
package main
import "fmt"
func main() {
it 'closes properly the dropdown associated to each option', js: :true do
options.each do |option, code|
show_dropdown(option)
select_option(option, code)
expect(dropdown_closed?(option)).to be true
end
end