A hand crafted markdown document contains all major Javascript topics covered, taken from different sources. Brush Up your JS memory.
Single line comments start with //
. For multi-line commands, you use /* ... */
// This is a single line comment
# A heavily customized VCL to support WordPress | |
# Some items of note: | |
# Supports https | |
# Supports admin cookies for wp-admin | |
# Caches everything | |
# Support for custom error html page | |
vcl 4.0; | |
import directors; | |
import std; |
#!/bin/bash | |
# Upload vps-setup.sh file | |
# open terminal and change permission like: chmod +x ./setup.sh | |
# ./vps-setup.sh | |
# delete this file after setup :) | |
COLOR_RESET="\033[33;0m" | |
COLOR_RED="\033[33;31m" | |
COLOR_GREEN="\033[33;32m" |
#!/usr/bin/env php | |
<?php | |
//usage: php envato-screenshots-downloader.php /path/to/save/screenshots http://url/to/screenshots/page | |
set_time_limit(0); | |
$dir = $argv[1]; | |
$source = $argv[2]; | |
print_r($argv); | |
mkdir ($dir); | |
$src = file_get_contents($source); | |
$pattern = '/src="(https:\/\/0.s3[a-zA-Z0-9_\-\.\/%]+)"/i'; |
HTTP redirection, or URL redirection, is a technique of pointing one domain or address to another. There are many uses for redirection, and a few different kinds of redirection to consider.
As you create content and administrate servers, you will often find the need to redirect traffic from one place to another. This guide will discuss the different use-cases for these techniques, and how to accomplish them in Apache and Nginx.
I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
server { | |
listen 80; | |
server_name www.example.com; | |
root /var/www/vhosts/example.com/public/; | |
location / | |
{ | |
index index.php index.html index.htm; | |
} |
## Configure eth0 | |
# | |
# vi /etc/sysconfig/network-scripts/ifcfg-eth0 | |
DEVICE="eth0" | |
NM_CONTROLLED="yes" | |
ONBOOT=yes | |
HWADDR=A4:BA:DB:37:F1:04 | |
TYPE=Ethernet | |
BOOTPROTO=static |
// | |
// SmoothScroll for websites v1.2.1 | |
// Licensed under the terms of the MIT license. | |
// | |
// You may use it in your theme if you credit me. | |
// It is also free to use on any individual website. | |
// | |
// Exception: | |
// The only restriction would be not to publish any | |
// extension for browsers or native application |
<?php | |
/** | |
* Generate Font Awesome Icons Array | |
* @author Monzurul Haque | |
* @author_uri https://github.com/farukham | |
**/ | |
//FontAwesome (4.3.0) Icons array list | |
$icons = array( |