Skip to content

Instantly share code, notes, and snippets.

View gillien's full-sized avatar

Guillaume Illien gillien

View GitHub Profile
[Unit]
Description=Puma HTTP Server
After=network.target
# Uncomment for socket activation (see below)
# Requires=puma.socket
[Service]
# Foreground process (do not use --daemon in ExecStart or config.rb)
Type=simple
@gillien
gillien / pre-commit
Created September 24, 2013 08:53
Pre commit hook to avoid pushing a focus nor binding.pry http://git-scm.com/book/en/Customizing-Git-Git-Hooks
grep -rE ',.*:focus' spec/
focus_clean=$?
grep -rE '^ *(binding\.pry|debugger)' spec/ lib/ app/
pry_clean=$?
if [[ $focus_clean == "1" && $pry_clean == "1" ]]; then
exit 0;
else
exit 1;
@gillien
gillien / TextmasterApi.java
Created October 31, 2012 07:13
Access TextMaster API with different languages
//date formatting
import java.util.Date;
import java.text.SimpleDateFormat;
import java.util.TimeZone;
//http request
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.DataOutputStream;
$project['name'] = 'test';
$project['ctype'] = 'proofreading';
$project['language_from'] = 'fr';
$project['language_to'] = 'fr';
$project['category'] = 'C003';
$project['project_briefing'] = 'Hello word';
$project['same_author_must_do_entire_project'] = 'false';
$project['language_level'] = 'basic_language_level';
$project['work_template'] = 'Default';
- filter_description = [ { :value => :approved, :traduction => t('approved'), :condition => true }, { :value => :pending, :traduction => t('pending'), :condition => true }, { :value => :canceled, :traduction => t('canceled'), :condition => true } ]
- sort_by_description = { :created_at => t('created_at') }
#clients_my_credits{ :'data-module' => 'Groups.Clients.MyCredits' }
= render :partial => "shared/tm_table", :locals => { :controller => 'groups/clients', :action => 'my_credits', :elements => @wire_requests, :empty_msg => "empty_table_bottom_my_invoices", :partial_for_element => "/groups/clients/my_credits/my_wire_transfer_row_table", :partial_for_action => '/groups/clients/my_credits/buy_bundles', :sort_by_description => sort_by_description, :filter_description => filter_description }