Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');
curl --include \ | |
--no-buffer \ | |
--header "Connection: Upgrade" \ | |
--header "Upgrade: websocket" \ | |
--header "Host: example.com:80" \ | |
--header "Origin: http://example.com:80" \ | |
--header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \ | |
--header "Sec-WebSocket-Version: 13" \ | |
http://example.com:80/ |
{ | |
"name": "showConfig", | |
"runtime": "nodejs", | |
"description": "Returns Redis host and Serverless stage", | |
"handler": "redis/showConfig/handler.handler", | |
"timeout": 6, | |
"memorySize": 256, | |
"custom": { | |
"optimize": true | |
}, |
Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');
#!/bin/bash -xv | |
### Country list | |
# CHANGE WITH YOUR COUNTRIES | |
COUNTRIES="europe/france/guadeloupe europe/france/guyane europe/france/mayotte europe/france/martinique europe/france/reunion europe/france" | |
# SMALL SUBSET FOR TESTING: | |
COUNTRIES="europe/france/guyane europe/france/mayotte" | |
NOMINATIM="/var/www/Nominatim" | |
cd $NOMINATIM/data |
var _ = require('lodash'); | |
function stringifyEnums(message) { | |
_.forEach(message.$type.children, function(child) { | |
var type = _.get(child, 'element.resolvedType', null); | |
if (type && type.className === 'Enum' && type.children) { | |
var metaValue = _.find(type.children, { | |
id: message[child.name] | |
}); | |
if (metaValue && metaValue.name) |
[Unit] | |
Description=Apache Kafka server (broker) | |
Documentation=http://kafka.apache.org/documentation.html | |
Requires=network.target remote-fs.target syslog.target | |
After=network.target remote-fs.target syslog.target | |
ConditionPathExists=/etc/kafka/server.properties | |
ConditionPathExists=/var/lib/kafka | |
[Service] | |
Type=simple |
angular.module('app.resources', ['ngResource']) | |
.factory('api', function ($resource) { | |
var api = { | |
defaultConfig : {id: '@id'}, | |
extraMethods: { | |
'update' : { | |
method: 'PUT' | |
} |
I've sniffed most of the Tinder API to see how it works. You can use this to create bots (etc) very trivially. Some example python bot code is here -> https://gist.github.com/rtt/5a2e0cfa638c938cca59 (horribly quick and dirty, you've been warned!)