Skip to content

Instantly share code, notes, and snippets.

View matheusfaustino's full-sized avatar
💪
Daily workout: git push, git pull

Matheus Faustino matheusfaustino

💪
Daily workout: git push, git pull
View GitHub Profile
@matheusfaustino
matheusfaustino / shadowfox_updater_updater.php
Last active September 3, 2018 14:39
ShadowFox Updater Updater - update the updater of shadowfox (for linux 64, yet) https://github.com/overdodactyl/ShadowFox
<?php
$latestRelease = 'https://api.github.com/repos/SrKomodo/shadowfox-updater/releases/latest';
$tempFilename = 'temp_shadowfox.tar.gz';
$os = 'Linux_x64';
$context = \stream_context_create([
'http' => [
'method' => 'GET',
'header' => 'Accept: application/vnd.github.v3+json',
@matheusfaustino
matheusfaustino / rofi-setup.md
Last active April 9, 2020 02:37
Rofi Setup Ubuntu (fullscreen)

Installation: rofi-dev version from apt

Plugin:

Command (shortcut alt + space):

nice -n 0 rofi -lazy-grab -combi-modi window,drun -show combi -modi combi,calc -no-levenshtein-sort

  • Use the shift + arrow to change to live calculator
@matheusfaustino
matheusfaustino / configs.programs.txt
Created February 2, 2018 19:05
configs sublime|phpstorm
--------------------
-- idea.properties
--------------------
# custom PhpStorm properties
editor.zero.latency.typing=true
--------------------
-- phpstorm 64 vmoptions
@matheusfaustino
matheusfaustino / copy_modifications.sh
Last active March 27, 2018 00:31
Copy all files modified (keeping folder tree) in a git repository to a target folder
#
# In a git repo folder
# Usage: copy_modifications ~/folder/target
#
copy_modifications () {
git status -sb | grep -e '^ M' | cut -c 2- | awk '{printf("rsync -Rv %s '$1'/\n",$0);}' | sh;
}
copy_additions () {
git status -sb | grep -e '^A' | cut -c 2- | awk '{printf("rsync -Rv %s '$1'/\n",$0);}' | sh;
@matheusfaustino
matheusfaustino / goodreads.bulk.read.name.user.js
Created January 7, 2018 23:59
Bulk read action Gooreads by Name (set all the books with a certain name as read)
// ==UserScript==
// @name Bulk read action Gooreads by Name
// @namespace goodreads.bulk.read.name
// @author matheusfaustino
// @description set all the books with a certain name as read
// @include *goodreads.com/series/*
// @include *goodreads.com/search*
// @version 1
// @grant none
// ==/UserScript==
@matheusfaustino
matheusfaustino / composer.sh
Created December 9, 2017 11:18
Composer alias excluding xdebug in docker container
alias composer='php -n dextension=iconv.so -dextension=simplexml.so -dextension=xml.so -dextension=xmlwriter.so -dextension=dom.so -dextension=tokenizer.so -dextension=json.so -dextension=pdo.so -dextension=phar.so -dextension=zip.so -dextension=gd.so -dextension=mbstring.so -dextension=apcu.so -dextension=intl.so /usr/local/bin/composer';
@matheusfaustino
matheusfaustino / xdebug_container.sh
Created December 9, 2017 11:17
Basic config to use Xdebug in a docker container + phpstorm integration (as a server and as a cli).
# bash
# usage: xphp <php_file>
# xphp index.php
export PHP_IDE_CONFIG="serverName=<server_name_phpstorm>";
alias xphp='XDEBUG_CONFIG=\"idekey=PHPSTORM\" php -dxdebug.idekey=PHPSTORM -dxdebug.remote_host=172.17.0.1 -dxdebug.remote_port=9000 -dxdebug.default_enable=1 -dxdebug.remote_enable=1';
# xdebug config (Dockerfile)
RUN echo "\
xdebug.var_display_max_depth = 10\n \
xdebug.var_display_max_children = 256\n \
@matheusfaustino
matheusfaustino / warning_me.sh
Last active December 8, 2017 16:03
Command to display a window, after X minutes, to remeber you of something. If you have something very important going on, cancel it, it will try again after 5 minutes.
# warning me (Linux)
# usage: warning_me <minute> <text>
# warning_me 5 "Take Coffee"
warning_me () {
sleep "${1}m"
zenity --question --text="$2" --title="Warning Me" 2> /dev/null
if [ $? -eq 1 ]; then
warning_me 5 $2
fi
@matheusfaustino
matheusfaustino / linux.md
Last active October 20, 2020 17:08
things that I use on linux : configs, tweaks, apps

OS set up

EndeavoursOs (https://endeavouros.com) with KDE (5.20)

KDE

  • Breeze Dark theme, Breeze Dark Plasma Style, Breeze as Window Decorations and Breeze Dark Icons/Cursors
  • Fonts:
    • Noto Sans 10pt
    • Hack 10pt
    • Noto Sans 8pt
  • Anti-Aliasing Enable
@matheusfaustino
matheusfaustino / gomovies.page.mymovies.user.js
Last active July 23, 2017 12:24
GoMovies "My Movies" enhanced (UserScript)
// ==UserScript==
// @name GoMovies "My Movies" enhanced
// @namespace gomovies.page.mymovies
// @author matheusfaustino
// @description Separe movies and series in my movies page
// @include https://gostream.is/user/movies/favorite*
// @version 1.1.0
// @grant none
// ==/UserScript==