Skip to content

Instantly share code, notes, and snippets.

View jbudziak's full-sized avatar
🏠
Working from home

jerome budziak jbudziak

🏠
Working from home
View GitHub Profile
@gdakram
gdakram / Rails 2 Environment
Created May 16, 2011 17:58 — forked from laserlemon/Rails 2 Environment
Snow Leopard -- RVM, Homebrew, Git, Imagemagick
# Installs on Snow Leopard.
# Homebrew
ruby -e "$(curl -fsS http://gist.github.com/raw/323731/install_homebrew.rb)"
echo 'export PATH=/usr/local/bin:/usr/local/sbin:$PATH' >> ~/.bash_profile
# Close Terminal window.
# Git
brew install git
brew update
@lucasmezencio
lucasmezencio / gist:2788630
Created May 25, 2012 15:03
HTML5 Snippet for Sublime Text 2
<snippet>
<content><![CDATA[
<!doctype html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 23, 2024 05:34
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@opi
opi / drushrc.php
Created June 21, 2012 07:18
Drush RC file.
<?php
/**
* Shell Aliases
*/
$options['shell-aliases']['pull'] = '!git pull'; // We've all done it.
$options['shell-aliases']['pulldb'] = '!git pull && drush updatedb';
$options['shell-aliases']['noncore'] = 'pm-list --no-core';
$options['shell-aliases']['wipe'] = 'cache-clear all';
@GoZOo
GoZOo / gitignore global mac
Created September 17, 2012 09:59
Gitignore global Mac
*~
.DS_Store
.idea
@opi
opi / gist:3972431
Created October 29, 2012 08:46
Drsuh commande to update site language domain
<?php
function MYMODULE_drush_command() {
$items = array();
$items['languages-domain'] = array(
'aliases' => array('lang-domain'),
'bootstrap' => DRUSH_BOOTSTRAP_DRUSH, // No bootstrap at all.
'options' => array(
'domain' => 'Specify domain (local, dev, prod)',
@opi
opi / gist:4024093
Created November 6, 2012 11:17
Add contextual link to block
<?php
// See http://dominiquedecooman.com/blog/drupal-7-tip-add-contextual-links-anything
// See http://drupal.org/node/1089922
// hook_menu
// Menu item must have 'context' set to MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE
function mymodule_menu() {
return array(
@EtienneRd
EtienneRd / gist:4134954
Created November 23, 2012 10:28
Drupal:Format download file link
/**
* Implements hook_field_formatter_info()
*/
function MYMODULE_field_formatter_info()
{
return array(
// Format de téléchargement de fichier
'MYMODULE_file_link' => array(
'label' => t('Download link'),
'field types' => array('file')
@opi
opi / gist:4193667
Created December 3, 2012 08:34
Drupal: Admin form for file
<?php
function mymodule_admin_image() {
$form = array();
// Image wrapper
$form['image_default'] = array(
'#type'=>'fieldset',
'#title' => "Image par defaut",
'#collapsible' => TRUE,
@FabienSalles
FabienSalles / .gitconfig
Last active March 4, 2024 23:11
Git configuration
[alias]
st = status -sb
co = checkout
amend = commit --amend -C HEAD
lg = log --pretty=format:\"%C(yellow)%h %C(blue)%ad%C(red)%d %C(reset)%s%C(green) [%cn]\" --decorate --date=short
undo = reset --soft HEAD^
lg1 = log --graph --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(bold white)— %an%C(reset)%C(bold yellow)%d%C(reset)' --abbrev-commit --date=relative
unchanged = update-index --assume-unchanged
[color]
ui = true