Skip to content

Instantly share code, notes, and snippets.

View franklinjavier's full-sized avatar

Frank franklinjavier

View GitHub Profile
/*
* Remove acentos
*
* @param {string} str - String a ser alterada
* @example removeAccent('São Paulo'); // Sao Paulo
*/
function removeAccent() {
var st = arguments[0].toLowerCase();
function debounce( e, callback, ms ) {
switch( e.type ) {
case 'mouseover':
try {
window.timeoutId = setTimeout( callback, ms );
} catch( evt ) {
console.error( evt );
@franklinjavier
franklinjavier / install-spotify.sh
Last active September 15, 2021 19:17
Install spotify on Arch Linux
wget https://aur.archlinux.org/packages/sp/spotify/spotify.tar.gz && tar -zxvf spotify.tar.gz && cd spotify && makepkg -s
pacman -U spotify<TAB><ENTER>
@franklinjavier
franklinjavier / cVim-alfred.css
Last active June 4, 2019 15:43
cVim theme inspired by Yosemite Spotlight
#cVim-link-container, .cVim-link-hint, #cVim-command-bar, #cVim-command-bar-mode, #cVim-command-bar-input, #cVim-command-bar-search-results, .cVim-completion-item, .cVim-completion-item .cVim-full, .cVim-completion-item .cVim-left, .cVim-completion-item .cVim-right, #cVim-hud, #cVim-status-bar {
font-family: Helvetica, Helvetica Neue, Neue, sans-serif, Arial;
font-size: 9pt !important;
-webkit-font-smoothing: antialiased !important;
border-radius: 4px!important;
}
#cVim-link-container {
position: absolute;
pointer-events: none;
#cVim-link-container, .cVim-link-hint, #cVim-command-bar, #cVim-command-bar-mode, #cVim-command-bar-input, #cVim-command-bar-search-results, .cVim-completion-item, .cVim-completion-item .cVim-full, .cVim-completion-item .cVim-left, .cVim-completion-item .cVim-right, #cVim-hud, #cVim-status-bar {
font-family: Helvetica, Helvetica Neue, Neue, sans-serif, Arial;
font-size: 9pt !important;
-webkit-font-smoothing: antialiased !important;
}
#cVim-link-container {
position: absolute;
pointer-events: none;
width: 100%; left: 0;

Mint upgrade procedures

Some investigation and tests on how to upgrade Mint machine.

Tests performed on Mint Cinnamon 14/15/16, on physical machine 14->15 and VirtualBox VMs for 14->15->16 and 14->16.

As usual you could break your machine, so please do backups before and cross fingers.

Mint 14 -> Mint 15

@franklinjavier
franklinjavier / arch
Last active August 29, 2015 14:04
Connect to the network automatically
ARQUIVO#1: init/start.sh
#!/bin/bash
sudo wpa_supplicant -D wired -i eno1 -c wpa_supplicant.conf &
sudo dhclient eno1
ARQUIVO#2: init/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
@franklinjavier
franklinjavier / unix-tricks.md
Last active August 29, 2015 14:03
Unix tricks

font: http://cfenollosa.com/misc/tricks.txt

I have marked with a * those which I think are absolutely essential Items for each section are sorted by oldest to newest. Come back soon for more!

BASH

  • In bash, 'ctrl-r' searches your command history as you type
  • Input from the commandline as if it were a file by replacing 'command < file.in' with 'command <<< "some input text"'
  • '^' is a sed-like operator to replace chars from last command
@franklinjavier
franklinjavier / bootstrap.sh
Created July 2, 2014 03:59
Script to control my dot files
#!/usr/bin/env bash
backup_file() {
test -e $HOME/$1 && cp -LiR $HOME/$1 $HOME/$1.dotbackup && rm -rf $HOME/$1
true
}
backup_directory() {
test -d $HOME/$1.dotbackup && echo -n "~/$1.dotbackup: " && rm -rI $HOME/$1.dotbackup
test -d $HOME/$1 && cp -LR $HOME/$1 $HOME/$1.dotbackup && rm -rf $HOME/$1
@franklinjavier
franklinjavier / install-dependencies.sh
Last active August 29, 2015 14:03
Screencasting on Gnu/Linux
sudo add-apt-repository ppa:fossfreedom/byzanz
sudo apt-get update && sudo apt-get install byzanz
#
# If you are behind a firewall
#
#!/bin/bash
sudo apt-get update 2> /tmp/keymissing;