##General:
- [Package Control] (http://wbond.net/sublime_packages/package_control/installation) (make installing other packages easier)
- AdvancedNewFile
- SideBarEnhancements
- Git
- GitGutter
- DocBlockr
/* | |
* Inspired by: | |
* http://designedbythomas.co.uk/blog/how-detect-width-web-browser-using-jquery | |
* | |
* This script is ideal for getting specific class depending on device width | |
* for enhanced theming. Media queries are fine in most cases but sometimes | |
* you want to target a specific JQuery call based on width. This will work | |
* for that. Be sure to put it first in your script file. Note that you could | |
* also target the body class instead of 'html' as well. | |
* Modify as needed |
/* | |
* | |
* Originally inspired by: http://designedbythomas.co.uk/blog/how-detect-width-web-browser-using-jquery | |
* | |
* Original source by https://gist.github.com/highrockmedia/3710930 | |
* | |
* My contribution: I re-wrote some code it to fire as one function, so you're only editing values in one place. | |
* | |
*/ |
/*! | |
* Bootstrap v3.2.0 Grid, Cleaned and manually minified by Nadir, grab a LTR version at | |
* https://gist.github.com/anonymous/58b6b2de80e56acf08bc | |
*/ | |
input, | |
button, | |
select, | |
textarea { | |
font-family: inherit; |
__author__ = 'Eslam Hamouda | eslamx.com' | |
import configparser | |
import os.path | |
import json | |
import io | |
# get the required files paths to access Firefox AppData | |
win_user_profile = os.getenv('USERPROFILE') |
##General:
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Single Upload Form with PHP</title> | |
</head> | |
<body> | |
<form method="POST" action="upload.php" enctype="multipart/form-data"> | |
<label for="file"> Pick a file : </label> |
function hex2rgb($hex) { | |
$hex = str_replace("#", "", $hex); | |
if(strlen($hex) == 3) { | |
$r = hexdec(substr($hex,0,1).substr($hex,0,1)); | |
$g = hexdec(substr($hex,1,1).substr($hex,1,1)); | |
$b = hexdec(substr($hex,2,1).substr($hex,2,1)); | |
} else { | |
$r = hexdec(substr($hex,0,2)); | |
$g = hexdec(substr($hex,2,2)); |
<?php | |
/** | |
* @link http://jonathonhill.net/2012-05-18/unshorten-urls-with-php-and-curl/ | |
*/ | |
function unshorten_url($url) { | |
$ch = curl_init($url); | |
curl_setopt_array($ch, array( | |
CURLOPT_FOLLOWLOCATION => TRUE, // the magic sauce | |
CURLOPT_RETURNTRANSFER => TRUE, |
<?php | |
/** | |
* A simple regex to test whether or not a facebook url is valid. For basic usage, this will do the job. | |
* @see Test cases <http://ideone.com/ZMJp4f> | |
*/ | |
$fbUrlCheck = '/^(https?:\/\/)?(www\.)?facebook.com\/[a-zA-Z0-9(\.\?)?]/'; | |
$secondCheck = '/home((\/)?\.[a-zA-Z0-9])?/'; | |
$validUrl = 'https://www.facebook.com/atomicpages/'; | |