Skip to content

Instantly share code, notes, and snippets.

@deyvisonrocha
deyvisonrocha / zip_files_changed_from_commits_on_git.sh
Created January 24, 2019 02:48
How to zip files changed from between commits on git
git diff-tree -r --no-commit-id --name-only <LAST_COMMIT> <FIRST_COMMIT> | xargs tar -rf modified.tar
@deyvisonrocha
deyvisonrocha / install_epson_l395_drivers.md
Last active September 18, 2018 13:15
Install Epson L395 Drivers for Ubuntu 18.04

Install dependencies

$ sudo apt install lsb -y

Download Drivers

cd /tmp
wget https://download3.ebz.epson.net/dsc/f/03/00/08/01/30/85cdc3897c33da79e9c6edc64f7747d1a7ebd047/epson-inkjet-printer-escpr_1.6.29-1lsb3.2_amd64.deb
wget https://download3.ebz.epson.net/dsc/f/03/00/08/01/31/93a01a8df20e8f26200e420dfed5092f8c12547d/epson-printer-utility_1.0.2-1lsb3.2_amd64.deb
@deyvisonrocha
deyvisonrocha / post-merge
Created May 24, 2018 12:53 — forked from GianlucaGuarini/post-merge
Git hook that gets triggered after any 'git pull' whenever one of the files specified has changed. Useful to update any web application dependency using bower npm or composer
#/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# forked by Gianluca Guarini
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep -E --quiet "$1" && eval "$2"
}
@deyvisonrocha
deyvisonrocha / post-merge
Created May 24, 2018 12:51 — forked from sindresorhus/post-merge
git hook to run a command after `git pull` if a specified file was changed.In this example it's used to run `npm install` if package.json changed and `bower install` if `bower.json` changed.Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
#!/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# git hook to run a command after `git pull` if a specified file was changed
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && eval "$2"
@deyvisonrocha
deyvisonrocha / digitalocean.md
Last active April 22, 2018 13:12
Digital Ocean - Passo a passo para criar uma VPS
@deyvisonrocha
deyvisonrocha / telegram-accent-elementary.md
Last active March 23, 2018 02:05
Telegram accent on Elementary OS 0.4

telegramdesktop/tdesktop#1360 (comment)

This works for me on elementary OS 0.3 and 0.4

You should have ibus-unikey installed, if you don't do it with this command:

sudo apt-get install ibus-unikey

Now configure ibus through ibus-setup. To do this, run the command on a terminal and go to the input method tab.

@deyvisonrocha
deyvisonrocha / config.md
Created December 14, 2017 20:27
Linux + Visual Studio Code + Docker

Configurations

php.ini file configuration to docker:

xdebug.idekey = "VSCODE"
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
xdebug.remote_port = 9000
xdebug.remote_host = 
@deyvisonrocha
deyvisonrocha / setVarInBlade.php
Last active August 2, 2016 20:20
Create a extend command on Blade for Laravel 4.
<?php
/*
|--------------------------------------------------------------------------
| Extend blade so we can define a variable
| <code>
| @define $variable = "whatever"
| </code>
|--------------------------------------------------------------------------
*/
@deyvisonrocha
deyvisonrocha / mysql_backup_script.sh
Created May 19, 2016 12:53
MySQL - Script de Backup
#!/bin/bash
#################### SCRIPT PARA BACKUP MYSQL ####################
# Jeferson R. Costa <rc.jeferson@gmail.com> #
# Created Feb, 2013 #
# Update Feb, 2013 #
# Definindo parametros do MySQL
echo " -- Definindo parametros do MySQL ..."
DB_NAME='dbname'
@deyvisonrocha
deyvisonrocha / example.php
Created July 29, 2015 20:43
Exemplo código Ajax.
<?php
$connect = mysql_connect('localhost', 'root', 'root');
?>