Skip to content

Instantly share code, notes, and snippets.

@rzani
rzani / Using Byobu.md
Last active August 29, 2015 14:18
Using Byobu

Using byobu

What's byobu?

Byobu is a GPLv3 open source text-based window manager and terminal multiplexer. It was originally designed to provide elegant enhancements to the otherwise functional, plain, practical GNU Screen, for the Ubuntu server distribution. Byobu now includes an enhanced profiles, convenient keybindings, configuration utilities, and toggle-able system status notifications for both the GNU Screen window manager and the more modern Tmux terminal multiplexer, and works on most Linux, BSD, and Mac distributions.

Create new session

$ byobu new -s yourname
@rzani
rzani / ssh config.md
Last active January 19, 2016 15:51
SSH login without password

Create rsa key

user$ ssh-keygen -t rsa

Create .ssh in server target (The directory may already exist, which is fine)

user$ ssh user@server mkdir -p .ssh
@rzani
rzani / remove github commit.md
Last active August 29, 2015 14:19
How to remove a commit that is already pushed to Github

Using this is dangerous in a collaborative environment: you're rewriting history

$ git reset --hard <old-commit-id>
$ git push -f origin <branch>
@rzani
rzani / iTerm2 configs.md
Last active August 29, 2015 14:19
iTerm2 configuration and tricks

iTerm2 home and end of line config

FOR   ACTION          SEND
⌘←    "HEX CODE"      0x01 
⌘→    "HEX CODE"      0x05
⌥←    "SEND ESC SEQ"  b
⌥→    "SEND ESC SEQ"  f
@rzani
rzani / get ip aws ec2
Created April 30, 2015 17:57
Get IP AWS EC2
Public IP
curl http://169.254.169.254/latest/meta-data/public-ipv4
Local IP
curl http://169.254.169.254/latest/meta-data/local-ipv4
@rzani
rzani / min-responsive.css
Last active August 29, 2015 14:20
Default responsive css
img {
max-width: 100%;}
/* Structure */
.container {
max-width: 1128px;
margin: 0 auto;}
/* Clearfix */
@rzani
rzani / url struture.md
Created May 1, 2015 12:38
WordPress Tricks

To beautify url

In personal struture:

/%category%/%postname%

In base tags

@rzani
rzani / setBrightness.md
Last active September 1, 2015 21:20
Salvar configuração do brilho de tela Linux

Abra o terminal e digite o seguinte comando para retornar o diretório das configurações de brilho:

ls /sys/class/backlight

NOTA: No meu caso o diretório chama intel_backlight

We get this question often lately. Here's the scenario:
I was trying to re-size or copy my UEFI (Unified Extensible Firmware Interface) for one reason or another and now I can't boot my Windows 8 or 8.1 PC.
There are some free software solutions out there some seem to work some don't. Most often when we receive this question the user has tried to use the Windows Copy command and the Windows Disk Management Tool (WDMT) to copy the UEFI partitions contents to larger partition, then uses the WDMT to delete the old UEFI partition then re-size the new one, set the new UEFI partition to active and then re-boot. This is were the trouble starts. At this point the BCD store is corrupted and the system will not boot. Here is a fix that I hope will help.
Firstly, boot from a Windows 8 recovery drive (CD/DVD/USB). If you don't have a recovery drive (and this is likely because most new machines don't come with one), then you will either have to install the drive into another Windows 8 machine or obtain a Windows 8 rec
@rzani
rzani / Swapping alt and ctrl keys.md
Last active November 8, 2015 14:22
Ubuntu Utils

To do this manually you want to create a file called .Xmodmap in your home directory. You could do this using a command from the terminal

~$ gedit ~/.Xmodmap

That will create the file and open it in gedit. Add the following lines to the file:

clear control