Simple nodejs script to convert timeline from twitter (https://dev.twitter.com) to twtxt (https://github.com/buckket/twtxt) format.
$ npm install twitter moment
$ convert.js > ~/twtxt.txt
Simple nodejs script to convert timeline from twitter (https://dev.twitter.com) to twtxt (https://github.com/buckket/twtxt) format.
$ npm install twitter moment
$ convert.js > ~/twtxt.txt
{ | |
"_links" : { | |
"self" : {"href" : "/kids/123"}, | |
"teacher" : {"href" : "/teachers/999"}, | |
"possible-teacher": {"href" : "/kids/123/possible-teachers"} | |
}, | |
"name" : "Johnny", | |
"mom_phone" : "5554443333" | |
} |
application/vnd.collection+json
{ "collection" :
{
"version" : "1.0",
"href" : "http://example.org/friends/",
"links" : [
{"rel" : "feed", "href" : "http://example.org/friends/rss"}
{ | |
"title": "Apples", | |
"tags": ["fruits"], | |
"id": "4ec92e34-34fb-47c1-a2b9-139866eb431a", | |
"_links": { | |
"self": {"href": "https://hateoas-notes.herokuapp.com/api/hal/notes/4ec92e34-34fb-47c1-a2b9-139866eb431a"}, | |
"up": {"href": "https://hateoas-notes.herokuapp.com/api/hal/notes"}, | |
"https://hateoas-notes.herokuapp.com/rels/owner": { | |
"href": "https://hateoas-notes.herokuapp.com/api/hal/users/61a4552c-d73e-4176-a912-adf404f5b6d1", | |
} |
define bash_exec ( | |
$command = $name, | |
$user, | |
$creates = undef, | |
$cwd = undef, | |
$environment = undef, | |
$group = undef, | |
$logoutput = undef, | |
$onlyif = undef, | |
$path = undef, |
<?php | |
class MailQueueService() | |
{ | |
public function getMailsFolder() | |
{ | |
return '/tmp/mails/'; | |
} | |
public function popSpooledMail() |
@mixin respond-to($medias...) { | |
$breakpoints-length: length($respond-to-breakpoints); | |
@each $media in $medias { | |
$had-a-hit: false; | |
@for $i from 1 through $breakpoints-length { | |
$breakpoint: nth($respond-to-breakpoints, $i); | |
@if $media == nth($breakpoint, 1) { | |
$definition: nth($breakpoint, 2); |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "precise64" |
<?php | |
function createFoo() | |
{ | |
$pdo = new PDO(/*...*/); | |
$maxTryCount = 3; | |
$tryCount = $maxTryCount; | |
while ($tryCount > 0) | |
{ |
Hint: This is heavily based on https://gist.github.com/3428555.
Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).
The request type and the URL Structure (path only, no root url). METHOD may be GET
| POST
| DELETE
| PUT
.