Set up project:
mkdir project
cd project
npm init -y
<VirtualHost 109.74.199.47:80> | |
ServerAdmin [email protected] | |
ServerName thatextramile.be | |
ServerAlias www.thatextramile.be | |
ProxyRequests off | |
<Proxy *> | |
Order deny,allow | |
Allow from all |
Hex Opacity Values | |
100% — FF | |
95% — F2 | |
90% — E6 | |
85% — D9 | |
80% — CC | |
75% — BF | |
70% — B3 | |
65% — A6 |
#!/bin/bash | |
composer create-project laravel/laravel $1 --prefer-dist | |
cd $1 | |
composer install | |
node install | |
touch README.md | |
cp .env.example .env | |
git init | |
git add -A |
#!/bin/bash | |
#script extraido de: http://paulocassiano.wordpress.com/2008/08/29/deixando-o-gedit-com-a-cara-do-textmate/ | |
#tip for better "resolution" here: http://blog.siverti.com.br/2008/05/22/fonte-monaco-no-ubuntugedit/ | |
cd /usr/share/fonts/truetype/ | |
#TODO: put validation if folder already exists | |
sudo mkdir ttf-monaco |
#include <iostream> | |
using namespace std; | |
struct node{ | |
int value; | |
node *left; | |
node *right; | |
}; |
#include <type_traits> | |
#include <iostream> | |
// This template is called 'or_combinator' | |
// it takes 2 function templates 'func1' , and 'func2' | |
// the arguments to each type function is template<typename> | |
// which means any typename | |
// you invoke them via func1<T>::value | |
// but they aren't instantiated until you ask for or_combinator<>::lambda<>::value |
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
While on a branch with a couple of commits, you can edit a commit with interactive rebase. This should be used sparingly and only on branches and never on master.
$ git checkout my-branch
$ git log
#!/bin/sh | |
#Check the Drive Space Used by Cached Files | |
du -sh /var/cache/apt/archives | |
#Clean all the log file | |
#for logs in `find /var/log -type f`; do > $logs; done | |
logs=`find /var/log -type f` | |
for i in $logs |