$ cd /path/to/files $ rename 's/-mIF-/-mImpFRA-/' *
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
cd $( brew --prefix )/Homebrew/Library/Taps/homebrew/homebrew-core/Formula | |
if [[ -e qt@5.5.rb ]]; then | |
mv qt@5.5.rb qt@5.5.rb.bkp | |
fi | |
wget -q https://raw.githubusercontent.com/Homebrew/homebrew-core/9ba3d6ef8891e5c15dbdc9333f857b13711d4e97/Formula/qt@5.5.rb | |
# delete line 25 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global --add gitflow.multi-hotfix true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mosab@debian:~$ ps -ef | |
UID PID PPID C STIME TTY TIME CMD | |
root 1 0 0 22:53 ? 00:00:01 /sbin/init | |
root 2 0 0 22:53 ? 00:00:00 [kthreadd] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def is_palindrome(s): | |
return all(s[i] == s[~i] for i in range(len(s) // 2)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
#@author Mosab Ahmad <mosab.ahmad@gmail.com> | |
import os | |
import sys | |
import config | |
import requests | |
import traceback |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
with plt.xkcd(): | |
fig = plt.figure() | |
ax = fig.add_axes((0.1, 0.2, 0.8, 0.7)) | |
ax.bar([-0.125, 1.0 - (5 * 0.125), 1.0 - 0.125], [10, 50, 250], 0.25) | |
ax.spines['right'].set_color('none') | |
ax.spines['top'].set_color('none') | |
ax.xaxis.set_ticks_position('bottom') | |
ax.set_xticks([0, 0.5, 1]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* A quick solution for the question in this blog post: | |
* http://www.thousandtyone.com/blog/EasierThanFizzBuzzWhyCantProgrammersPrint100To1.aspx | |
* | |
* Took me 30 seconds, without the comments. | |
* | |
* The problem: | |
* Print 100 to 1. | |
* You need to start with "for(int i=0;" and continue from there. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A quick solution for the question in this blog post: | |
* http://www.thousandtyone.com/blog/EasierThanFizzBuzzWhyCantProgrammersPrint100To1.aspx | |
* | |
* Took me 30 seconds, without the comments. | |
* | |
* The problem: | |
* Print 100 to 1. | |
* You need to start with "for(int i=0;" and continue from there. | |
* You cannot write anything before "for(int i=0;". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
#@author Mosab Ahmad <mosab.ahmad@gmail.com> | |
import os | |
import re | |
MOVIES_PATH = '/home/mosab/Videos/youtube' |
NewerOlder