Skip to content

Instantly share code, notes, and snippets.

View ghigt's full-sized avatar

Ghislain Guiot ghigt

  • Paris
View GitHub Profile
/*
* Extracting Action Creators
*/
let nextTodoId = 1;
// This is our reducer for a single todo
const todo = (state, action) => {
switch (action.type) {
case 'ADD_TODO':
@ghigt
ghigt / svg.svg
Created January 12, 2016 09:21
svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ghigt
ghigt / gist:7066e6ca75734334de7f
Last active August 29, 2015 14:23
Mysql update via brew

$ brew update && brew upgrade --all

[...]

==> Installing mysql
==> Downloading https://homebrew.bintray.com/bottles/mysql-5.6.25.yosemite.bottle.tar.gz
######################################################################## 100.0%
==> Pouring mysql-5.6.25.yosemite.bottle.tar.gz
2015-01-29T22:28:33.320310+00:00 app[web.1]: Started GET "/en/activities" for 85.168.7.56 at 2015-01-29 22:28:33 +0000
2015-01-29T22:28:33.337932+00:00 app[web.1]: Rendered public_activity/user/_new_friend.html.slim (3.3ms)
2015-01-29T22:28:33.346642+00:00 app[web.1]: Rendered public_activity/critic/_create.html.slim (4.6ms)
2015-01-29T22:28:33.352320+00:00 app[web.1]: Rendered public_activity/collection/_create.html.slim (1.5ms)
2015-01-29T22:28:33.362628+00:00 app[web.1]: Rendered public_activity/critic/_create.html.slim (4.8ms)
2015-01-29T22:28:33.322875+00:00 app[web.1]: Processing by ActivitiesController#index as HTML
2015-01-29T22:28:33.322945+00:00 app[web.1]: Parameters: {"locale"=>"en"}
2015-01-29T22:28:33.333041+00:00 app[web.1]: Rendered public_activity/collection/_follow.html.slim (2.5ms)
2015-01-29T22:28:33.341242+00:00 app[web.1]: Rendered public_activity/user/_new_friend.html.slim (2.5ms)
2015-01-29T22:28:33.349798+00:00 app[web.1]: Rendered public_activity/interest/_adding.html
@ghigt
ghigt / app.go
Created January 19, 2015 13:56
Simple discovery app in go using consul
package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
"strconv"
"github.com/armon/consul-api"
diff --git a/app/views/collections/_fields.html.slim b/app/views/collections/_fields.html.slim
index 7309524..d576241 100644
--- a/app/views/collections/_fields.html.slim
+++ b/app/views/collections/_fields.html.slim
@@ -1,15 +1,10 @@
= render 'shared/error_messages', model: @collection
-<<<<<<< HEAD
-= f.label :name
-= f.text_field :name
@ghigt
ghigt / gist:6266770
Created August 19, 2013 08:15
errors for command rake markus:reset_demo
$ rake markus:reset_demo --trace
** Invoke markus:reset_demo (first_time)
** Invoke environment (first_time)
** Execute environment
DEPRECATION WARNING: config.action_view.debug_rjs will be removed in 3.1, from 3.1 onwards you will need to install prototype-rails to continue to use RJS templates . (called from /Users/GhiGt/Projects/MarkUsProject/config/environment.rb:9)
** Execute markus:reset_demo
Destroying old Assignments
Converting 'a' to 'instructor'
Renaming 'c5hanson' to 'student'
Generating Assignment A1 and A2...
@ghigt
ghigt / _boot.js.erb
Last active December 20, 2015 23:28
Post Blog Markus [do not touch!]
<script type="text/javascript">
//<![CDATA[
jQuery(document).ready(function() {
users_table = new FilterTable({
[...]
});
});
new Ajax.Request('<%=populate_students_path()%>',
@ghigt
ghigt / REAMDE.md
Last active March 24, 2017 15:58
Fix problems with locales

Run script.sh as:

curl -L https://gist.github.com/GhiGt/6185331/raw/26ecb9da925fbb31ce25799a30e7a889a675934a/script.sh | sudo bash

Then restart.

@ghigt
ghigt / README.md
Created August 7, 2013 07:33
Problem installation Ruby, subversion...
$ tar xf subversion-1.7.11.tar.gz
$ cd subversion-1.7.11
$ ./configure --with-ruby-sitedir=/usr/local/rvm/rubies/ruby-1.8.7-p374/lib/ruby --prefix=/usr/local/rvm/rubies/ruby-1.8.7-p374/ --disable-mod-activation --without-apache-libexecdir
$ make
$ make swig-rb
$ make install
$ make install-swig-rb