Skip to content

Instantly share code, notes, and snippets.

@rzani
rzani / howto.md
Created October 25, 2015 15:22
Fixing a Corrupted UEFI Partition in Windows 8 or 8.1

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 / free disk and memory
Created October 26, 2015 19:00
Shell utilities
selection=
until [ "$selection" = "0" ]; do
echo "
PROGRAM MENU
1 - Display free disk space
2 - Display free memory
0 - exit program
"
echo -n "Enter selection: "
@rzani
rzani / .bash_profile
Created February 29, 2016 00:13 — forked from JeffreyWay/.bash_profile
Prettier git logs
alias gl="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
@rzani
rzani / .emacs
Created March 13, 2016 15:55
emacs
; ------------------------------------------
; => Custom
; ------------------------------------------
(windmove-default-keybindings) ; Active S-<arrows_keys> navigation between splits
(setq frame-title-format "emacs") ; Set title
(menu-bar-mode -1) ; Removes the menu bar
(tool-bar-mode -1) ; Removes the tool bar
(scroll-bar-mode -1) ; Removes the scroll bar
(ido-mode)

How to change Pantheon Terminal's color scheme

Many of us spend many hours of our days using their terminal. Plus, we all have different tastes when it comes to color schemes. That's why the ability to change the color scheme of a terminal is one of its more important featuresl. Throughout this tutorial, I'll teach you how you can change the looks of your terminal, step by step.

This tutorial is aimed at elementary OS users, but it also works for any Ubuntu user. Start by installing dconf-tools:

sudo apt-get install dconf-tools

Secondly, you need to decide which theme you're going to apply. You can find dozens of terminal color schemes online, you can even design your own using this web application. Design the color scheme, hit "Get Scheme" and choose "Terminator". You'll get a raw text file with a background color, a foreground color and a palette. Those strings define your color scheme. In this tutorial, I'll post an

@rzani
rzani / multiple_ssh_setting.md
Created June 23, 2016 14:08 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@rzani
rzani / README.md
Created June 28, 2016 17:37 — forked from chadrien/README.md
Debug PHP in Docker with PHPStorm and Xdebug

Debug your PHP in Docker with Intellij/PHPStorm and Xdebug

  1. For your local dev, create a Dockerfile that is based on your production image and simply install xdebug into it. Exemple:
FROM php:5

RUN yes | pecl install xdebug \
&amp;&amp; echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" &gt; /usr/local/etc/php/conf.d/xdebug.ini \
@rzani
rzani / Dockerfile
Created January 25, 2017 21:08
Nginx + Pagespeed
FROM debian:jessie
MAINTAINER Rodrigo Zani <rodrigo.zhs@gmail.com>
ENV NGINX_VERSION 1.11.9
ENV NPS_VERSION 1.11.33.4
RUN apt-get update && \
apt-get install -y build-essential zlib1g-dev libpcre3 libpcre3-dev unzip make wget libssl-dev && \
rm -rf /var/lib/apt/lists/*
@rzani
rzani / Dockerfile
Created February 7, 2017 14:58
PHP 5.6
FROM php:5.6.22-fpm
# Installing Composer
RUN curl -sS https://getcomposer.org/installer | php && mv ./composer.phar /usr/local/bin/composer
RUN apt-get update && apt-get install -y \
zip \
unzip \
curl \
git-core \
@rzani
rzani / readme.md
Created February 15, 2017 11:36
Change timezone docker containers

Dockerfile

RUN echo America/Sao_Paulo | sudo tee /etc/timezone && sudo dpkg-reconfigure --frontend noninteractive tzdata

Inside container

echo America/Sao_Paulo | tee /etc/timezone &amp;&amp; sudo dpkg-reconfigure --frontend noninteractive tzdata