Skip to content

Instantly share code, notes, and snippets.

AmrEldib / git.lua
Created Feb 29, 2016
Customize Windows Cmder Prompt
View git.lua
-- Find out current branch
-- @return {false|git branch name}
function get_git_branch()
for line in io.popen("git branch 2>nul"):lines() do
local m = line:match("%* (.+)$")
if m then
return m
AmrEldib / 404ForCaseSensitiveURLs.js
Created Feb 7, 2016
Jekyll 404 page on GitHub Pages to fix case sensitive URLs
View 404ForCaseSensitiveURLs.js
var allposts = [];
function redirectToCorrectPage() {
{% for post in site.posts %}
allposts.push("{{ site.url }}{{ post.url }}");
{% endfor %}
var url = window.location.toString();
if (url.slice(-1) === "/") {
url = url.slice(0, -1);
var allpostsUpperCase = {
AmrEldib /
Last active Feb 19, 2016
Recommended Global npm Packages to install


AmrEldib / userstyle.css
Created Jan 2, 2016
Updated UserStyle for Better Arabic Font on Twitter
View userstyle.css
This is a modified version of the userstyle "Twitter Persian/Arabic Optimization"
This modification applies the Arabic font only on text with Arabic language while keeping
other languages with the default font
This is done using the :lang(ar) attribute
AmrEldib / ChocolateyInstalls.txt
Last active Aug 29, 2015
Chocolatey Installs
View ChocolateyInstalls.txt
choco install 7zip.install
choco install cmdermini
choco install flashplayerplugin
choco install flashplayeractivex
choco install notepadplusplus.install
choco install sumatrapdf.install
choco install libreoffice
choco install ccleaner
choco install vlc
choco install clover
View KeybaseProof.txt
### Keybase proof
I hereby claim:
* I am AmrEldib on github.
* I am amr ( on keybase.
* I have a public key whose fingerprint is D629 1605 2F4E 3B96 A510 276E C9DE FAD6 D0F4 A3C9
To claim this, I am signing this object:
View AppLogger-GetTempFileName.cs
string logFilePath = Path.GetTempFileName();
View AppLogger-Configure.cs
View AppLogger-ILog.cs
ILog log = LogManager.GetLogger("Logger");
View AppLogger-Using.cs
using log4net;
using log4net.Config;