Skip to content

Instantly share code, notes, and snippets.

View zaherg's full-sized avatar
🎯
Focusing

Zaher Ghaibeh zaherg

🎯
Focusing
View GitHub Profile
@zaherg
zaherg / app.js
Created June 14, 2013 12:31 — forked from viezel/app.js
// This is an example of use.
// Here we use the new Bearer Token thats make it possible to get tweets without user login
// More info on Bearer here: https://dev.twitter.com/docs/auth/application-only-auth
// Full Codebird API is here: https://github.com/mynetx/codebird-js
var Codebird = require("codebird");
var cb = new Codebird();
cb.setConsumerKey('CONSUMER_KEY', 'CONSUMER_SECRET_KEY');
var bearerToken = Ti.App.Properties.getString('TwitterBearerToken', null);
http://benpickles.github.io/peity/
http://www.humblesoftware.com/finance/index
https://github.com/HumbleSoftware/envisionjs
http://humblesoftware.com/flotr2/
http://dygraphs.com/
http://tenxer.github.io/xcharts/examples/
http://square.github.io/cubism/
http://www.justgage.com/
<?php
// app/start/global.php
/*
|--------------------------------------------------------------------------
| Application Error Logger
|--------------------------------------------------------------------------
|
| Here we will configure the error logger setup for the application which
@zaherg
zaherg / index.html
Created August 13, 2013 11:47 — forked from crofty/index.html
<!DOCTYPE html>
<html>
<head>
<title>Leaflet</title>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.3.1/leaflet.css" />
<script src="http://cdn.leafletjs.com/leaflet-0.3.1/leaflet.js"></script>
<script src="http://maps.google.com/maps/api/js?v=3.2&sensor=false"></script>
<script src="http://matchingnotes.com/javascripts/leaflet-google.js"></script>
</head>
<body>
function XCallbackURL(_url) {
this.url = _url;
this.parsedURI = parseUri(_url);
}
XCallbackURL.prototype.isCallbackURL = function() {
return this.parsedURI.host.toLowerCase() == 'x-callback-url';
};
XCallbackURL.prototype.action = function() {
return this.parsedURI.file;
};
@zaherg
zaherg / vagrant-laravel-storage
Created September 23, 2013 07:50
you should add this to make laravel 4 storage folder works .. most people may tell you to add the `:extra` parameter, but becareful the `:extra` is related to vagrant 1.2.x not 2 nor 1.3.x if your using vagrant 2 you should use the `:mount_options` change log for 1.3 * The "extra" flag on synced folders to specify additional mount options has be…
config.vm.synced_folder "./laravel/app/storage", "/var/www/laravel/app/storage", id: "vagrant-laravel-storage", :owner => 'www-data', :group => 'www-data'

How to set up stress-free SSL on an OS X development machine

One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.

Most workflows make the following compromises:

  • Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.

  • Use production SSL certificates locally. This is annoying

@zaherg
zaherg / install.md
Last active October 18, 2020 17:45
a small tips to install latest nginx , php 5.5 & laravel 4.1 since that Laravel 4.1 has been released, i have removed the line which explain how to install laravel from dev branch using composer.

Creating Your Laravel & nginx Server

We will install Larave 4.1 with PHP5.5 & Latest nginx on Ubuntu 12.04.3 x64.

updating your system

apt-get update && apt-get upgrade
adduser [username]
usermod -aG sudo [username]
apt-get -y install git
# Colorful Bash Prompt, inspired by "Extravagant Zsh Prompt"
# Screenshot: http://img.gf3.ca/d54942f474256ec26a49893681c49b5a.png
# A big thanks to \amethyst on Freenode
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then export TERM=gnome-256color
elif infocmp xterm-256color >/dev/null 2>&1; then export TERM=xterm-256color
fi
if tput setaf 1 &> /dev/null; then
tput sgr0