Skip to content

Instantly share code, notes, and snippets.

chadrien / Makefile
Created June 3, 2015 12:21
Proxy commands in Makefile (useful for docker for instance)
View Makefile
SUPPORTED_COMMANDS := command1 command2
ifneq "$(SUPPORTS_MAKE_ARGS)" ""
# use the rest as arguments for the command
COMMAND_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
# ...and turn them into do-nothing targets
$(eval $(COMMAND_ARGS):;@:)
victorhaggqvist / wakelock.service
Last active May 7, 2023 10:55
Lock screen after suspend with i3lock and systemd
View wakelock.service
# file /etc/systemd/system/wakelock.service
Description=Lock the screen on resume from suspend
damien-biasotto /
Last active April 9, 2017 20:43
Magento Security Patch SUPEE-53XX.

##Patch SUPEE_53XX for almost every versions of Magento.

###Here is the mapping patch version - magento version

  • SUPEE_5344 : For magento to Magento
  • SUPEE_5345 : For magento
  • SUPEE_5346 : For Magento
  • SUPEE_5341 : For Magento
  • SUPEE_5390 : For Magento
  • SUPEE_5388 : For Magento to
drogus / Rakefile.rb
Created July 26, 2013 10:49
This is the example contents of the Rakefile, which you would use to run active record tasks without using Rails. It assumes using the same directories as rails uses: `db/migrate`, `config/database.yml`.
View Rakefile.rb
require 'bundler/setup'
require 'active_record'
include ActiveRecord::Tasks
db_dir = File.expand_path('../db', __FILE__)
config_dir = File.expand_path('../config', __FILE__)
DatabaseTasks.env = ENV['ENV'] || 'development'
piscisaureus /
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url =

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

leon / nginx.conf
Created June 29, 2012 16:34
Nginx PHP-FPM Symfony 2 minimal config
View nginx.conf
server {
listen 80;
server_name localhost;
root /home/website/web;
rewrite ^/app\.php/?(.*)$ /$1 permanent;
try_files $uri @rewriteapp;
location @rewriteapp {
MohamedAlaa / tmux-cheatsheet.markdown
Last active June 9, 2023 07:53
tmux shortcuts & cheatsheet
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname
View tmux_cheatsheet.markdown

tmux cheatsheet

As configured in my dotfiles.

start new:


start new with session name: