The popular open-source contract for web professionals by Stuff & Nonsense
- Originally published: 23rd December 2008
- Revised date: March 15th 2016
- Original post
# ================================================================================ | |
# Redirects uploads to production. | |
# ================================================================================ | |
<IfModule mod_rewrite.c> | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^wp-content/uploads/(.*)$ https://www.some-website.com/wp-content/uploads/$1 [R=301,NC,L] | |
</IfModule> | |
# ================================================================================ |
/** Class representing a point. */ | |
class Point { | |
/** | |
* Create a point. | |
* @param {number} x - The x value. | |
* @param {number} y - The y value. | |
*/ | |
constructor(x, y) { | |
// ... | |
} |
version: '3' | |
services: | |
db: | |
image: mysql:5.7 | |
volumes: | |
- db_data:/var/lib/mysql | |
ports: | |
- "3406:3306" | |
restart: always |
var services = '/services/...'; // Update this with your Slack service... | |
var channel = "#aws-deployments" // And this with the Slack channel | |
var https = require('https'); | |
var util = require('util'); | |
var formatFields = function(string) { | |
var | |
message = JSON.parse(string), | |
fields = [], |
::Make sure registry commands are not disabled or windows is damaged | |
reg /? | |
if errorlevel 1 ( | |
GOTO SYSTEMREPAIR | |
) | |
if errorlevel 0 ( | |
GOTO HI | |
) |
/** Class representing a point. */ | |
class Point { | |
/** | |
* Create a point. | |
* @param {number} x - The x value. | |
* @param {number} y - The y value. | |
*/ | |
constructor(x, y) { | |
// ... | |
} |
export class TryCatchExample { | |
mtdExample() { | |
try { | |
for (editIndex = 0; editIndex < partner.objProjects.length; editIndex++) | |
{ | |
if (partner.objProjects[editIndex].id == req.body.projectId) {found = true; break;} | |
} | |
if (!found) | |
{ |
export class Example { | |
private strVariable: string; | |
constructor() { | |
// Something to do during init. | |
} | |
mtdNothing = (): string => { | |
return "I'm returning nothing."; | |
} // mtdNothing() |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |