Skip to content

Instantly share code, notes, and snippets.

View tomasperezv's full-sized avatar
🤖
Focusing

Tomás Pérez tomasperezv

🤖
Focusing
View GitHub Profile
@tomasperezv
tomasperezv / gist:9597351
Created March 17, 2014 10:58
vim7.3 + debian squeeze
sudo apt-get install ncurses-dev python-dev
wget ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2
tar jxf vim-7.3.tar.bz2
mkdir vim73/patches
cd vim73/patches/
curl -O 'ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.[001-783]'']'
cd ../src/po
wget https://vim.googlecode.com/hg/src/po/nl.po
cd ../../
cat patches/7.3.* | patch -p0
@tomasperezv
tomasperezv / gist:9852845
Created March 29, 2014 11:33
Give Network Manager Sufficient Privileges in awesome window manager
# http://jeffhoogland.blogspot.fr/2012/05/howto-give-network-manager-sufficient.html
# 1) content of /etc/polkit-1/localauthority/50-local.d/org.freedesktop.NetworkManager.pkla
[nm-applet]
Identity=unix-group:netdev
Action=org.freedesktop.NetworkManager.*
ResultAny=yes
ResultInactive=no
ResultActive=yes
-- {{{
--
-- Autostarting for Awesome <3.4!
-- Add this section to the end of your rc.lua
-- configuration file within ~/.config/awesome/rc.lua
--
-- If you're using Awesome 3.5 change:
-- add_signal -> connect_signal
-- remove_signal --> disconnect_signal
--
#!/bin/sh
# Set up the environment. Respect $DISTRIB_CODENAME if it's set.
. /etc/lsb-release
# Fail fast if we're not on Lucid or Oneiric.
if [ $UID != 0 ]; then
echo "You are not root. Installing a package needs root privileges."
exit 1
fi
@tomasperezv
tomasperezv / install-ghost.sh
Created April 12, 2014 18:26
Install Ghost blogging platform
# Latest nodejs version required
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
# Install Ghost dependencies
sudo npm install -g grunt-cli
npm install
@tomasperezv
tomasperezv / gist:11032188
Created April 18, 2014 08:45
Size in MB's of mysql DB's
SELECT table_schema "DB Name", Round(Sum(data_length + index_length) / 1024 / 1024, 1) "DB Size in MB"
FROM information_schema.tables
GROUP BY table_schema;
@tomasperezv
tomasperezv / aptitude.sh
Last active August 29, 2015 14:00
Configure a brand new Ubuntu server setup
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install software-properties-common git openjdk-7-jdk openjdk-7-jre
@tomasperezv
tomasperezv / gist:11213780
Created April 23, 2014 12:43
Check if we are inside of a TMUX session
if ! { [ "$TERM" = "screen" ] && [ -n "$TMUX" ]; } then
PS1="@$HOSTNAME $PS1"
fi

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@tomasperezv
tomasperezv / 1-install_firefox_nightly.sh
Created May 21, 2014 10:09
Install and run FirefoxOS in the browser
sudo add-apt-repository ppa:ubuntu-mozilla-daily/ppa
sudo apt-get update
sudo apt-get install firefox-trunk