Skip to content

Instantly share code, notes, and snippets.

View ichaida's full-sized avatar

Ismail Chaida ichaida

View GitHub Profile
@ichaida
ichaida / 0Inbox.sh
Last active August 29, 2015 14:11 — forked from msis/0Inbox.sh
#!/bin/bash
#this script looks for a window named Mozilla Firefox and then starts procedure to select all mails in the current folder and archive them
for i in {1..30}
do
xdotool search --name "Mozilla Firefox" key s+a
xdotool search --name "Mozilla Firefox" key e
sleep 5
done

Mac OS X 10.10 Yosemite

Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

Install Software

@ichaida
ichaida / PyQt5_Setup.md
Last active July 20, 2016 10:54
Qt 5 Framework PyQt5 setup on Mac OS X El Capitan

Qt 5 Framework PyQt5 setup on Mac OS X El Capitan


First of all we have to install SIP binary, I found some issue linking the binary to Python Qt therefore, I've used Hombrew to do the job

brew install sip

Let's force the symlinks creation if there is any previous versions of SIP brew link --overwrite sip

@ichaida
ichaida / clear_docker_logs.md
Last active August 10, 2016 13:43
Clear Docker logs

Clear Docker's container logs

For ZSH use noglobto escape the wildcards.

noglob truncate -s 0 /var/lib/docker/containers/*/*-json.log

Docker images/containers cleaning

1- Delete all containers

docker ps -q -a | xargs docker rm

-q prints only the container IDs -a prints all containers

@ichaida
ichaida / build_docker.sh
Last active August 11, 2016 13:53
Build and run dockerize application project
#!/usr/bin/env bash
# Connect to shell to the default machine
eval "$(docker-machine env default)"
# -------------------------------------------------
# Variables
# -------------------------------------------------
# Names to identify images and containers of this app
IMAGE_NAME='NAME'
CONTAINER_NAME="NAME"
PORT=5000
@ichaida
ichaida / feature_updated.sh
Created September 14, 2016 08:30
Keep feature branch updated
function update(){
git checkout master && git pull && git checkout - && git rebase master
}
@ichaida
ichaida / restart_bluetooth.sh
Created October 8, 2016 09:11
Restart Bluetooth Daemon on Mac OS X without rebooting the OS
#!/bin/bash
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
@ichaida
ichaida / generate_random_tokens.sh
Created October 14, 2016 18:56
Shell script that generate random tokens
echo `dd if=/dev/urandom bs=128 count=1 2>/dev/null | base64 | tr -d "=+/" | dd bs=32 count=1 2>/dev/null`
@ichaida
ichaida / breaktime.sh
Created October 31, 2016 20:28
Break Time is a simple shell script that's help you remember to take breaks away from your computer.
#!/bin/bash
# Visit Github:
# https://github.com/variadico/noti
# Install latest:
# go get -u github.com/variadico/noti/cmd/noti
# On macOS:
# brew install noti