Skip to content

Instantly share code, notes, and snippets.

View tahirm's full-sized avatar

Tahir tahirm

  • Zürich, Switzerland
View GitHub Profile
INSTALL SYMFONY APP IN A SUBFOLDER OF AN EXISTING SITE
http://www.yegods.it/2015/01/30/install-symfony-app-in-a-subfolder-of-an-existing-site/
Here a solution using virtual host Alias:
<VirtualHost *:80>
DocumentRoot "/var/www/html/vhosts/example.com/public_html"
ServerName www.example.com
<Directory "/var/www/html/vhosts/example.com/public_html">
@tahirm
tahirm / .htaccess
Last active August 29, 2015 14:16 — forked from nab8/.htaccess
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discussions around concrete examples, not handy-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

Launch Sublime Text 2 from the Mac OS X Terminal

Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.

open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl

You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html

Installation

@tahirm
tahirm / uri.js
Created May 16, 2014 14:51 — forked from jlong/uri.js
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@tahirm
tahirm / hack.sh
Last active August 29, 2015 13:57 — forked from erikh/hack.sh
OSX Hacks. #osx
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@tahirm
tahirm / gist:9643964
Last active August 29, 2015 13:57 — forked from peteymoore/gist:5392815
Simple HTML5 Template #html5 #template
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>HTML5 Template</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
</body>