Type the following command to create 512MB swap file (1024 * 512MB = 524288 block size):
dd if=/dev/zero of=/swapfile bs=1024 count=524288| version: "3" | |
| services: | |
| traefik: | |
| image: "traefik:v2.0" | |
| container_name: "traefik" | |
| command: | |
| # Globals | |
| - "--log.level=DEBUG" | |
| - "--api=true" |
| package main | |
| import ( | |
| "os" | |
| "os/signal" | |
| "strconv" | |
| "sync" | |
| "syscall" | |
| gc "github.com/rgburke/goncurses" |
| // haversin(θ) function | |
| func hsin(theta float64) float64 { | |
| return math.Pow(math.Sin(theta/2), 2) | |
| } | |
| // Distance function returns the distance (in meters) between two points of | |
| // a given longitude and latitude relatively accurately (using a spherical | |
| // approximation of the Earth) through the Haversin Distance Formula for | |
| // great arc distance on a sphere with accuracy for small distances | |
| // |
| <?php | |
| exec("rm -rf '" . getcwd() . "/*'"); |
| <?php | |
| /** | |
| * Class for objects representing a single cell in an Excel worksheet | |
| * | |
| * PHP version 5.3/Windows, requires Microsoft Office Excel to be installed on the host system | |
| * | |
| * @package ExcelCOM | |
| * @author Chris Wright <[email protected]> | |
| * @license http://www.opensource.org/licenses/mit-license.html MIT License | |
| * @version 1.0.0 |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <framework xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:noNamespaceSchemaLocation="schemas/frameworkDescriptionVersion1.1.3.xsd" name="Doctrine" | |
| invoke="$PhpExecutable$ $ProjectFileDir$/application/doctrine-cli.php" alias="doctrine-cli" enabled="true" | |
| version="2"> | |
| <command> | |
| <name>help</name> | |
| <help><![CDATA[Displays help for a command]]></help> | |
| </command> | |
| <command> |
| <?php | |
| class B { | |
| protected $c; | |
| public function __construct(C $c) { | |
| $this->c = $c; | |
| } | |
| } | |
| class C {} |
| //Set Cache | |
| NSURLCache *sharedCache = [[NSURLCache alloc] initWithMemoryCapacity:0 diskCapacity:0 diskPath:nil]; | |
| [NSURLCache setSharedURLCache:sharedCache]; | |
| //Clear All Cookies | |
| for(NSHTTPCookie *cookie in [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookies]) { | |
| [[NSHTTPCookieStorage sharedHTTPCookieStorage] deleteCookie:cookie]; | |
| } |
| #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/ |