Skip to content

Instantly share code, notes, and snippets.

View lee-pai-long's full-sized avatar
💭
Work In Progress

Saïdina MOHAMED ALI lee-pai-long

💭
Work In Progress
  • Marseille (France)
View GitHub Profile
@lee-pai-long
lee-pai-long / deadsnakes.sh
Created March 15, 2016 14:03
Enable deadsnakes PPA, install Python 2.6, 2.7, 3.2 and 3.3, install easy_install and pip in to those versions
#!/usr/bin/env bash
sudo add-apt-repository ppa:fkrull/deadsnakes
sudo apt-get update
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O /tmp/ez_setup.py
py_ver=`python -c 'import sys; print ".".join(str(x) for x in sys.version_info[:2])'`
for i in 2.6 2.7 3.2 3.3
do
if [ "$i" != "$py_ver" ]
@lee-pai-long
lee-pai-long / 0_reuse_code.js
Created March 2, 2016 10:49
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

[SALTSTACK] OpenLDAP standard state


State file

ldap:
  pkg:
 - installed

[LINUX MINT 17.2] Install Pandoc


$ wget https://github.com/jgm/pandoc/releases/download/1.16.0.2/pandoc-1.16.0.2-1-amd64.deb \
> -O /tmp/pandoc-1.16.0.2-1-amd64.deb && \
> sudo dpkg -i $_

[VAGRANT] Passwordless sudo for the vagrant-hostmanager plugin


Create a file in the sudoers.d directory

$ [sudo] vim /etc/sudoers.d/vagrant-hostmanager

[BASH] Quickly add alias


$ alias my_alias='my_command'
$ echo "!!" >> ~/.bash_aliases

!! refer to the last command typed in bash history

[Vagrant] Troubleshooting : "No guest additions detected" Virtualbox error


vagrant plugin install vagrant-vbguest

source

[ZIMBRA] Modify SMTP Relay Host


$ [sudo] su -l zimbra -c \
> "zmprov ms `zmhostname` zimbraMtaRelayHost 'my-smtp-relay-name-or-ip:port'"

To checkout:

[ZIMBRA 8.x] Improve spamassassin detection


$ zmlocalconfig -e antispam_enable_rule_updates=true
$ zmlocalconfig -e antispam_enable_restarts=true
$ zmlocalconfig -e antispam_enable_rule_compilation=true
$ zmamavisdctl restart && zmmtactl restart

[BASH] Add go(lang) completion

$ [sudo] wget \
> https://raw.github.com/kura/go-bash-completion/master/etc/bash_completion.d/go \
> -O /etc/bash_completion.d/go