#Stay Standalone
A short script to prevent internal links to a "webapp" added to iPhone home screen to open in Safari instead of navigating internally.
body = MultipartBody.new(:field1 => 'test', :field2 => 'test2') | |
http = EventMachine::HttpRequest.new('http://example.com').post( | |
:head => {'content-type' => "multipart/form-data; boundary=#{body.boundary}"}, | |
:body => body.to_s | |
) | |
# Or with a file part included | |
part1 = Part.new('name', 'content', 'file.txt') |
// mkdir indextank | |
// wget https://github.com/SPORE/api-description/blob/master/services/indextank.json | |
// install node and npm | |
// npm install spore underscore futures | |
// edit baseUrl, password and index var | |
// node indextank.js | |
var baseUrl = 'http://xxx.api.indextank.com'; | |
var password = 'xxx'; | |
var index = 'test_spore'; |
#Stay Standalone
A short script to prevent internal links to a "webapp" added to iPhone home screen to open in Safari instead of navigating internally.
var express = require('express') | |
, cookieSessions = require('./cookie-sessions'); | |
var app = express(); | |
app.use(express.cookieParser('manny is cool')); | |
app.use(cookieSessions('sid')); | |
app.get('/', function(req, res){ | |
req.session.count = req.session.count || 0; |
def compile_asset?(path) | |
# ignores any filename that begins with '_' (e.g. sass partials) | |
# all other css/js/sass/image files are processed | |
if File.basename(path) =~ /^[^_].*\.\w+$/ | |
puts "Compiling: #{path}" | |
true | |
else | |
puts "Ignoring: #{path}" | |
false | |
end |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html> | |
<head> | |
<title>Simple Radar Chart</title> | |
<link rel="stylesheet" href="style.css"/> | |
<script src="http://mbostock.github.com/d3/d3.js?2.5.0"></script> | |
<script src="radar.js"></script> | |
</head><body><h1>Simple Radar Chart</h1> | |
<div id="viz"> | |
</div> |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
We are a new DC-area startup with Angel funding. Launched our prototype in April of this year; since then we've seen steady growth and happy, paying customers. (And we're already making waves among established players in the residential real estate industry.)
It's time to grow. We're looking to add a really good, well-rounded engineer to work alongside our CTO. (Rockstars, Code Ninjas, Ninjaneers, Ninjanerds, Silverbacks, and Brogrammers need not apply.) You'll be coding, of course, but you'll also need to think through design, architecture, and product-market fit, and take complete ownership of several key components of our system. In other words, be ready to wear many hats and change them on short notice.
#!/usr/bin/env bash | |
# credits: https://github.com/containous/traefik/issues/635#issuecomment-400423859 | |
# usage: revokeCert.sh {yourDomainToRevoke} | |
# the JSON path changed a bit compared with Traefik v1 | |
set -e | |
ACME_FILE=/traefik/path/traefik/acme.json # change | |
jq -r ".default.Certificates | .[] | select(.domain.main == \"$1\").key" < $ACME_FILE | base64 --decode > /tmp/a.key |