Skip to content

Instantly share code, notes, and snippets.

@nicolasramy
nicolasramy / wordpress.local
Created July 30, 2012 12:43
Simple Apache2 Virtual Host for WordPress
<VirtualHost *:80>
ServerAdmin nicolas.ramy@hostname.com
ServerName wordpress.local
# Indexes + Directory Root.
DirectoryIndex index.php index.html
DocumentRoot /var/www/workspace/wordpress/
# BEGIN WordPress
<IfModule mod_rewrite.c>
@nicolasramy
nicolasramy / install-debian
Created July 30, 2012 15:36
Installation script for debian / ubuntu
# First step
apt-get update
apt-get upgrade
# Error
# W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
# W: mdadm: no arrays defined in configuration file.
>> Need a solution to solve this problem
@nicolasramy
nicolasramy / md5.sh
Created December 5, 2012 12:47
Calculate MD5
#!/bin/bash
echo -n $1 | md5sum
@nicolasramy
nicolasramy / tips-git.md
Last active December 14, 2015 11:39
Tips for git: manage remotes, branches, tags and history

Git Cheat Sheet

Remote

Add remote RemoteName from specific URL (SSH)

git remote add RemoteName git@git.hostname.com:repository.git

Get informations about the remote

git remote show origin
@nicolasramy
nicolasramy / mysql-cs-01-introduction.md
Last active December 14, 2015 11:59
Tips for MySQL

MySQL Cheat Sheet

Databases

Tables

Create

Create ... Select

@nicolasramy
nicolasramy / iptables.md
Last active December 14, 2015 11:59
Tips for Debian System Administration - Installation, Configuration, Useful commands and Tools

IP Tables

Block IP

Block a specific IP

iptables -A INPUT -s 31.2.41.8 -j DROP

Block a range (31.2.41.*)

Magento Cheat Sheet

Code

Design

Template

URLs

@nicolasramy
nicolasramy / python-cs-01-installation.md
Last active August 20, 2019 07:00
My Python Cheat Sheet :- Installation- Functions- Snippets- Misc- Easter Eggs

#Python Cheat Sheet

Introduction

This is a short list of different packages to install to enhace your production in Python

pip

pip is a tool for installing and managing Python packages

@nicolasramy
nicolasramy / css-tools.md
Created July 8, 2013 13:00
Cheat sheets for PHP Quality Assurance, PHP developper tools, CSS tools... for Ubuntu 12.04+

CSS Developer tools

Requirements

NodeJS

add-apt-repository ppa:chris-lea/node.js
apt-get update
apt-get install nodejs
@nicolasramy
nicolasramy / ubuntu-12-04-install.post.sh
Last active December 5, 2016 11:26
Ubuntu post install guide for Gnome 3
gsettings set org.gnome.shell.overrides button-layout close,minimize,maximize:
gconftool-2 --set /apps/metacity/general/button_layout --type string ":minimize,maximize,close"
gsettings set org.gnome.desktop.interface ubuntu-overlay-scrollbars false
http://www.thebinaryidiot.com/archives/2011/11/11/gnome-shell-3-2-and-multiple-monitors/