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"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<meta name="description" content=""> | |
<meta name="author" content=""> | |
<link rel="shortcut icon" href="../../assets/ico/favicon.ico"> |
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
- Tab vs spaces | |
- Common Git workflow | |
- Code style to enforce | |
- variable naming conventions | |
- function naming convention | |
- Namespaces | |
- check PSR | |
- semantic versioning (http://semver.org/) | |
- JS linting with JSHint | |
- CSS pre-processor SASS vs LESS |
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
#!/bin/sh | |
if [ -z "$1" ] ; then | |
echo "usage: $0 <projectname> [/path/to/project]" | |
exit 1 | |
fi | |
MYPROJECT=$1 | |
if [ -z "$2" ] ; then |
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
def file_to_list(fname): | |
f = open(fname) | |
lst = f.readlines() | |
return [line.rstrip('\n') for line in lst] | |
def list_to_file(fname, lst): | |
f = open(fname, "w") | |
f.write("\n".join(lst)) |
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
$to = array('ayman@test.com'); | |
// setup Swift mailer parameters | |
$transport = Swift_SmtpTransport::newInstance( 'smtp.sendgrid.net', 465, 'ssl'); | |
$transport->setUsername('aymanfarhat '); | |
$transport->setPassword('mypass'); | |
$swift = Swift_Mailer::newInstance( $transport ); | |
// create a message (subject) |
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
apt-get update | |
echo "[Install] Build essential" | |
sudo apt-get install build-essential | |
echo "[Install] Python software properties" | |
apt-get install python-software-properties | |
echo "[Install] git" | |
apt-get install git |
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
class Program | |
{ | |
/* The triangle */ | |
static int[][] triangle = null; | |
/* Saves respective optimal sums of nodes in the triangle */ | |
static int[][] optimalSums = null; | |
static void Main(string[] args) | |
{ |
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
String.prototype.format = function() | |
{ | |
var args = arguments; | |
return this.replace(/{(\d+)}/g, function(match, number) | |
{ | |
return typeof args[number] != 'undefined'? args[number]:match; | |
}); | |
}; |
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
# Parses each string patterns to list of strings and lists(options) | |
def parse_patterns(patterns): | |
lines = [] | |
def getclosing(i,pattern): | |
for x in xrange(i,len(pattern)): | |
if pattern[x] == ")": | |
return x | |
return -1 |
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
/* Tomorrow Night Eighties Theme */ | |
/* Original theme - https://github.com/chriskempson/tomorrow-theme */ | |
/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ | |
/* Edited by Ayman Farhat(http://aymanfarhat.com) for supporting inline code tags without pre */ | |
.tomorrow-comment, code .comment, code .title { | |
color: #999999; | |
} | |
.tomorrow-red, code .variable, code .attribute, code .tag, code .regexp, code .ruby .constant, code .xml .tag .title, code .xml .pi, code .xml .doctype, code .html .doctype, code .css .id, code .css .class, code .css .pseudo { | |
color: #f2777a; |
OlderNewer