Sublime text:
GitGutter
Languages
Language preferences.
function requireSameArgType<A>(a: A, b: A) { | |
return null; | |
} | |
function main() { | |
requireSameArgType(1, 2); | |
requireSameArgType('string', 'still a string'); | |
requireSameArgType(1, 'string'); | |
} | |
function requireSameObjShape<T, K extends T>(a: T, b: K) { |
#pragma once | |
#include "defs.h" | |
struct StringParser { | |
const char *pos, *end; | |
char peek() { return *pos; } |
#!/bin/sh | |
# This script will monitor another HA node and take over an Elastic IP (EIP) | |
# if communication with the other node fails | |
# High Availability IP variables | |
# Other node's IP to ping and EIP to swap if other node goes down | |
HA_Node_IP=10.0.0.11 | |
EIP=10.0.0.10 | |
#Specify the Secondary Private IP for this node |
# this file lives in /project/app/management/commands/devtunnel.py | |
# it just spins up a localtunnel and retries it if it fails, until it gets a key command shutdown. | |
# you need to define some configuartion in your settings.py: SSH_TUNNEL_USER, SSH_SERVER_IP | |
# This assumes you're running your website on port 8070 | |
import sys | |
import time | |
import subprocess | |
from django.conf import settings |
var nock = require('nock'); | |
var low = require('lowdb'); | |
// lowdb is a great straight-to-json minidb. | |
var db = low('integration_test_nock_records.json'); | |
writeToFileLog = function(object) { | |
console.log("writing nock to json...."); | |
db('records').push(object); | |
} |
import fnmatch | |
import glob | |
import os | |
start_dir = '.' | |
start_dir = '/Users/peterconerly/src/picmonkey/py/frontend/frontend/static/js/v2' | |
extension = '*.coffee' | |
for root, dirnames, filenames in os.walk(start_dir): |
#!/usr/bin/env python | |
import tornado.httpserver | |
import tornado.ioloop | |
import tornado.web | |
from tornado.options import options | |
class FooHandler(tornado.web.RequestHandler): | |
def get(self): | |
self.write("derp") |
If you run php import.php
the expected output is:
$ php import.php
I am import.php
I am import.php, and I was run from the command line.
import os | |
from fabric.api import * | |
from jinja2 import Environment, FileSystemLoader | |
from StringIO import StringIO | |
PROJECT_PATH = os.path.abspath(os.path.dirname(__file__)) | |
@task | |
def config(): | |
# put nginx.conf template into remote nginx folder |