This file contains hidden or 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
<mockup version="1.0" skin="sketch" measuredW="1335" measuredH="838" mockupW="1311" mockupH="815"> | |
<controls> | |
<control controlID="0" controlTypeID="com.balsamiq.mockups::BrowserWindow" x="14" y="13" w="1181" h="815" measuredW="450" measuredH="400" zOrder="0" locked="false" isInGroup="-1"> | |
<controlProperties> | |
<text>LETS%20DO%20IT%20WITH%20NODE%20JS</text> | |
</controlProperties> | |
</control> | |
<control controlID="2" controlTypeID="com.balsamiq.mockups::VRule" x="885" y="151" w="-1" h="606" measuredW="5" measuredH="100" zOrder="1" locked="false" isInGroup="-1"> | |
<controlProperties> | |
<backgroundAlpha>0.25</backgroundAlpha> |
This file contains hidden or 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
from django.db import models | |
from django.utils.http import base36_to_int, int_to_base36 | |
from django.contrib.sites.models import Site | |
from django.core.urlresolvers import reverse | |
from django.conf import settings | |
import redis | |
import random | |
REDIS_SETTINGS = { |
This file contains hidden or 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
''' | |
*** | |
Modified generic daemon class | |
*** | |
Author: http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/ | |
www.boxedice.com | |
License: http://creativecommons.org/licenses/by-sa/3.0/ | |
This file contains hidden or 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
from daemon import Daemon | |
from logging import handlers | |
import os | |
import errno | |
import sys | |
import logging | |
import time | |
import ConfigParser | |
import datetime |
This file contains hidden or 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
getBoardBoundingBox: function(canvas) { | |
var minX = Number.MAX_VALUE; | |
var maxX = Number.MIN_VALUE; | |
var minY = Number.MAX_VALUE; | |
var maxY = Number.MIN_VALUE; | |
canvas.forEachObject(function(o){ | |
var rad = o.angle * Math.PI/180; | |
var w = o.width * o.scaleX; |
This file contains hidden or 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> | |
<title>Site Maintenance</title> | |
<style> | |
body { text-align: center; padding: 150px; } | |
h1 { font-size: 50px; } | |
body { font: 20px Helvetica, sans-serif; color: #333; } | |
article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
a { color: #dc8100; text-decoration: none; } | |
a:hover { color: #333; text-decoration: none; } | |
</style> |
This file contains hidden or 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
### | |
# Node.js app Docker file | |
# | |
# Some basic build instructions: | |
# ``` | |
# # you should delete node_modules b/c you don't want that copied during 'ADD' | |
# docker build -t thom-nic/node-bootstrap . | |
# # run a shell in the container to inspect the environment (as root): | |
# docker run --rm -itu root thom-nic/node-bootstrap /bin/bash | |
# ``` |
This file contains hidden or 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
/* | |
* draw a multiline string rotated in a canvas | |
* | |
* @param ctx (M) context of the canvas | |
* @param text (M) string may contain \n | |
* @param posX (M) horizontal start position | |
* @param posY (M) vertical start position | |
* @param textColor color | |
* @param rotation in degrees (by 360) | |
* @param font must be installed on client use websafe |
This file contains hidden or 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
<html> | |
<head> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/sockjs-client/0.3.4/sockjs.min.js"></script> | |
</head> | |
<body> | |
<h1>SOCKJS demo</h1> | |
<script> | |
var sock = new SockJS("http://localhost:8888/live"); | |
sock.onopen = function() { | |
console.log("open"); |
This file contains hidden or 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
# This is an example of the Stack Exchange Tier 1 HAProxy config | |
# The only things that have been changed from what we are running are: | |
# 1. User names have been removed | |
# 2. All Passwords have been remove | |
# 3. IPs have been changed to use the example/documentation ranges | |
# 4. Rate limit numbers have been changed to randome numbers, don't read into them | |
userlist stats-auth | |
group admin users $admin_user | |
user $admin_user insecure-password $some_password |
OlderNewer