Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
#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/ |
{ "keys": ["home"], "command": "move_to", "args": {"to": "bol"} }, | |
{ "keys": ["end"], "command": "move_to", "args": {"to": "eol"} } |
/* ---------------------------------------------------------- */ | |
/* */ | |
/* A media query that captures: */ | |
/* */ | |
/* - Retina iOS devices */ | |
/* - Retina Macs running Safari */ | |
/* - High DPI Windows PCs running IE 8 and above */ | |
/* - Low DPI Windows PCs running IE, zoomed in */ | |
/* - Low DPI Windows PCs and Macs running Firefox, zoomed in */ | |
/* - Android hdpi devices and above */ |
<?php | |
//initialize | |
$ch = curl_init(); | |
// 2. set the options, including the url | |
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); | |
curl_setopt($ch, CURLOPT_URL, "https://api.pingdom.com/api/2.0/traceroute?host=techslides.com"); | |
curl_setopt($ch, CURLOPT_USERPWD, "EMAIL:PASSWORD"); | |
curl_setopt($ch, CURLOPT_HTTPHEADER, array("App-Key: YOUR-KEY-HERE")); |
<?php | |
$host = $_GET["host"]; | |
if (empty($host)) { | |
echo 'Please provide host'; | |
} else { | |
//create the url for API call | |
$url = "https://api.pingdom.com/api/2.0/traceroute?host=".$host; |
# laravel new-app | |
alias laravel="git clone -o laravel -b develop https://github.com/laravel/laravel.git" | |
alias artisan="php artisan" | |
alias migrate="php artisan migrate" | |
alias serve="php artisan serve" | |
alias dump="php artisan dump" | |
alias t="phpunit" | |
# Generators Package |
// Demo: http://jsfiddle.net/jasonday/WxXLq/ | |
// [email protected] | |
$("#content").dialog({ | |
width: 'auto', // overcomes width:'auto' and maxWidth bug | |
maxWidth: 600, | |
height: 'auto', | |
modal: true, | |
fluid: true, //new option | |
resizable: false |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
# download docx2txt by Sandeep Kumar | |
wget -O docx2txt.pl http://www.cs.indiana.edu/~kinzler/home/binp/docx2txt | |
# make a wrapper | |
echo '#!/bin/bash | |
docx2txt.pl $1 -' > docx2txt | |
chmod +x docx2txt | |
# make sure docx2txt.pl and docx2txt are your current PATH. Here's a guide | |
http://shapeshed.com/using_custom_shell_scripts_on_osx_or_linux/ |