This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$aResponse = array('success' => false); | |
$from = $_POST['email']; | |
$message = $_POST['msg']; | |
$subject = $_POST['name']; | |
// To send HTML mail, the Content-type header must be set | |
$headers = 'MIME-Version: 1.0' . "\r\n"; | |
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; | |
$headers .= 'From: ' . $from . "\r\n"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>HTML5 Template</title> | |
<link rel="stylesheet" href="style.css"> | |
</head> | |
<body> | |
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var domain = location.protocol+'//'+location.hostname+(location.port ? ':'+location.port : ''); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysqldump -u USER -p -h dev.incuray.com DATABASE > /path/to/output/file/DATABASE.sql; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function doStuff(){ | |
landscape = window.orientation? window.orientation=='landscape' : true; | |
if(landscape && window.innerWidth<1900 && window.innerWidth > 768){ | |
//code here | |
} | |
} | |
window.onload=window.onresize=doStuff; | |
if(window.onorientationchange){ | |
window.onorientationchange=doStuff; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git checkout -b <new-branch> | |
This will leave your current branch as is, create and checkout a new branch and keep all your changes. You can then make a commit with: | |
$ git add <files> | |
and commit to your new branch with: | |
$ git commit | |
The changes in the working directory and changes staged in index do not belong to any branch yet. This changes where those changes would end in. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf | |
#Leave out the '-dPDFSETTINGS=/screen' setting for better quality, but slightly larger pdfs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install xdebug using pecl | |
$ sudo pecl install xdebug | |
# uninstall xdebug using pecl | |
$ sudo pecl uninstall xdebug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//trim string | |
function trim(str){ | |
return String.prototype.trim ? str.trim() : String(str).replace(/^([\s]*)|([\s]*)$/g, ''); | |
} |
OlderNewer