Skip to content

Instantly share code, notes, and snippets.

I'm hiring!

Ahmed Nuaman ahmednuaman

I'm hiring!
View GitHub Profile
ahmednuaman / error.txt
Created Feb 11, 2013
PHP crypto error read out
View error.txt
<br />
<font size='1'><table class='xdebug-error xe-warning' dir='ltr' border='1' cellspacing='0' cellpadding='1'>
<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Warning: file_get_contents() [&lt;a href='function.file-get-contents'&gt;function.file-get-contents&lt;/a&gt;]: SSL: crypto enabling timeout in file.php on line <i>32</i></th></tr>
<tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>
<tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr>
<tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0051</td><td bgcolor='#eeeeec' align='right'>647480</td><td bgcolor='#eeeeec'>{main}( )</td><td title='file.php' bgcolor='#eeeeec'>../file.php<b>:</b>0</td></tr>
<tr><td bgcolor='#eeeeec' a
ahmednuaman / animateCSS.js
Created Dec 7, 2011
jQuery plugin to dynamically apply animate.css animations
View animateCSS.js
(function ($) {
$.fn.animateCSS = function (effect, delay, callback) {
// Return this to maintain chainability
return this.each(function () {
// Cache $(this) for speed
var $this = $(this);
ahmednuaman / wordpress-multisite-lighttpd.conf
Created Dec 12, 2010
A nice little rewrite directive for WordPress Multi-site and Lighttpd
View wordpress-multisite-lighttpd.conf
url.rewrite-once = (
"^/(.*/)?files/$" => "/index.php",
"^/(.*/)?files/(.*)" => "/wp-content/blogs.php?file=$2",
"^(/wp-admin/.*)" => "$1",
"^/([_0-9a-zA-Z-]+/)?(wp-.*)" => "/$2",
"^/([_0-9a-zA-Z-]+/)?(.*\.php)" => "/$2",
"^/(.*)/?$" => "/index.php"
ahmednuaman /
Created Dec 1, 2010
A simple bash script to update Wordpress
# This work is licenced under the Creative Commons Attribution-Share Alike 2.0 UK: England & Wales License.
# To view a copy of this licence, visit or send a letter
# to Creative Commons, 171 Second Street, Suite 300, San Francisco, California 94105, USA.
# So before you start, the script assumes the following:
# 1. you have some sort of SSH access
# 2. you are owner of your blog (in terms of computa permissions)
# 3. the blog folder is called 'blog' (if not, change all instances of the word 'blog' with whatever it's called)
ahmednuaman /
Created Jun 25, 2014
Remove the v from git tags
for tag in $(git tag)
git tag "${tag/v/}" $tag
for tag in $(git tag)
if [[ $tag = *v* ]]
git tag -d $tag
ahmednuaman / subl3.json
Last active Aug 30, 2017
Sublimetext 3 prefs
View subl3.json
"auto_complete": true,
ahmednuaman / dynamo-import.js
Created May 17, 2017
Serverless-dynamodb-local migration to AWS script
View dynamo-import.js
const { basename, join } = require('path')
const { DynamoDB } = require('aws-sdk')
const { readFileSync } = require('fs')
const glob = require('glob')
const doc = new DynamoDB.DocumentClient({
region: 'eu-west-2'
glob(join(process.cwd(), 'seed/db/*.json'), (error, files) => {
View Vagrantfile
Vagrant.configure(2) do |config| = "ubuntu/vivid64" "forwarded_port", guest: 80, host: 8000
config.vm.synced_folder ".", "/var/www/html"
config.ssh.forward_agent = true
config.vm.provision "shell", inline: <<-SHELL
export DEBIAN_FRONTEND=noninteractive
# Download and Install the Latest Updates for the OS
apt-get update && apt-get upgrade -y
View .zshrc
alias zshconfig="st $HOME/.zshrc"
plugins=(git git-extras osx sublime)
export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:$PATH
export PATH=$HOME/.macports/bin:$HOME/.macports/sbin:$PATH
define [
], (BCtrl) ->
class AppController extends BCtrl
@register 'appController', [
# or (but then big inject deps could get long)