Skip to content

Instantly share code, notes, and snippets.

View 5a494d's full-sized avatar
🌴
On vacation

5a494d 5a494d

🌴
On vacation
View GitHub Profile
@5a494d
5a494d / s1.xml
Created October 9, 2015 22:57 — forked from davybrion/s1.xml
code snippet for "Hosting a Node.js site through Apache" post
<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
@5a494d
5a494d / hex-opacity-values.txt
Created October 3, 2017 14:25 — forked from frankyonnetti/CSS--hex-opacity-values.css
#css Hex Opacity Values
Hex Opacity Values
100% — FF
95% — F2
90% — E6
85% — D9
80% — CC
75% — BF
70% — B3
65% — A6
@5a494d
5a494d / create_laravel_app.sh
Last active October 12, 2017 13:51 — forked from connor11528/create_laravel_app.sh
Create a new Laravel application
#!/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
@5a494d
5a494d / install_monaco_font.sh
Created October 18, 2017 15:30 — forked from rogerleite/install_monaco_font.sh
Install Monaco font in Linux
#!/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
@5a494d
5a494d / btree.cpp
Created September 18, 2018 14:13 — forked from toboqus/btree.cpp
Binary tree implementation in c++
#include <iostream>
using namespace std;
struct node{
int value;
node *left;
node *right;
};
@5a494d
5a494d / template_lambda.cc
Created September 18, 2018 14:28 — forked from emaxerrno/template_lambda.cc
template_lazy_closures.cc
#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
@5a494d
5a494d / setting-up-babel-nodemon.md
Created October 12, 2018 20:31 — forked from sam-artuso/setting-up-babel-nodemon.md
Setting up Babel and nodemon

Setting up Babel and nodemon

Inital set-up

Set up project:

mkdir project
cd project
npm init -y
@5a494d
5a494d / gist:4ece221a93b134d9a7b191c9aa5238fe
Created December 11, 2018 16:12 — forked from stuart11n/gist:9628955
rename git branch locally and remotely
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
@5a494d
5a494d / gist:f6990276ff411ff60d36c4513b0f20eb
Created April 9, 2019 03:14 — forked from bkemper/gist:ca6ac68b174a047b5ccde3930c8568dc
How to edit a commit with interactive rebase

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.

  1. Checkout the branch

$ git checkout my-branch

  1. Get the ref of the commit that you want to edit from the commit log. (e.g. 67b191fc62eda52b5b208cc4de50df7144a03171)

$ git log

@5a494d
5a494d / clean.sh
Created August 4, 2020 19:21 — forked from Iman/clean.sh
Free up disk space on Ubuntu - clean log, cache, archive packages/apt archives, orphaned packages, old kernel and remove the trash
#!/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