Skip to content

Instantly share code, notes, and snippets.

View pierrevalade's full-sized avatar

Pierre pierrevalade

View GitHub Profile
function parse_git_branch {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
function proml {
local BLUE="\[\033[0;34m\]"
local RED="\[\033[0;31m\]"
local LIGHT_RED="\[\033[1;31m\]"
local GREEN="\[\033[0;32m\]"
local LIGHT_GREEN="\[\033[1;32m\]"
INSERT INTO "users" ("name", "single_access_token", "created_at", "perishable_token", "updated_at", "installed_at", "uid", "timezone", "persistence_token", "last_name", "birthday", "last_login_at", "email", "first_name", "middle_name", "access_token") VALUES(E'Portail Serialsfactory', E'aZ7UMhB7mDNTnjmY57n', '2010-10-15 05:18:44.419536', E'yKeOeTvYPHvPODxg8nh', '2010-10-15 05:18:44.419536', NULL, 100000349053153, NULL, E'f0ca0751e228777ec5784759f3492845472b0476a6da3b73b51bb713a0fb68b8b077c22f7dab8c50364945e5c3b65d8382899f12b9273cf7076a4f98ebc5cc7f', E'Serialsfactory', NULL, NULL, NULL, E'Portail', NULL, NULL) RETURNING "uid"
//
// UAPushNotification.m
// MyEarth
//
// Created by Pierre Valade on 08/07/10.
// Copyright 2010 Pierre Valade. All rights reserved.
//
#import "UAPushNotification.h"
We couldn’t find that file to show.
attr_accessor :attachment64
before_validation :save_attachment64
has_attached_file :attachment, :storage => :s3, :s3_credentials => "#{RAILS_ROOT}/config/aws.yml",
:path => "messages_images/:id/:style/:filename",
:styles => { :original => ['1000x600>'],
:normal => ['500x500>'],
:stack => ['137x133>']
},
require 'rubygems'
require 'right_aws'
i = 1
path = '/Users/pierre/Desktop/items/pictures/**/*'
s3 = RightAws::S3.new(access_key, secret_key)
s3_bucket = s3.bucket('twistip', false, 'public-read')
headers = {'Content-type' => 'image/jpeg', 'Expires' => "Thu, 01 Jul 2019 08:37:04 GMT", 'Cache-Control' => 'public, max-age=315360000'}
check process sphinx_<app_name>_3312
with pidfile /var/run/sphinx/<app_name>.pid
start program = "/engineyard/bin/thinking_sphinx_searchd <app_name> start" as uid <user_name> and gid <user_group>
stop program = "/engineyard/bin/thinking_sphinx_searchd <app_name> stop" as uid <user_name> and gid <user_group>
group sphinx_<app_name>
# Sphinx and ThinkingSphinx
after "deploy:migrate", "thinking_sphinx:home_made"
namespace :thinking_sphinx do
task :home_made do
# ensure the log directory exist
run "mkdir -p /var/log/engineyard/sphinx/#{application}"
steps = [:configure, :reindex]
run steps.map {|step| "/engineyard/bin/thinking_sphinx_searchd #{application} #{step}"}.join(' && ')
@pierrevalade
pierrevalade / gist:122297
Created June 2, 2009 15:26 — forked from 7hunderbird/gist:91641
put this in /etc/monit.d/sphinx.tiiptop.monitrc
check process sphinx_tiiptop_3312
with pidfile /var/run/sphinx/tiiptop.pid
start program = "/engineyard/bin/thinking_sphinx_searchd tiiptop start" as uid deploy and gid deploy
stop program = "/engineyard/bin/thinking_sphinx_searchd tiiptop stop" as uid deploy and gid deploy
group sphinx_tiiptop
Vampires:
tags: Vampires, Fantastique
genres: ""
Catholicisme:
genres: ""
"Math\xC3\xA9matiques":
tags: "Math\xC3\xA9matiques, Sciences Techniques et M\xC3\xA9decine"
genres: ""
Nature, animaux et jardinage:
genres: ""