An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
full_width = 80 | |
columns = 12 | |
gutter = 1 | |
.container | |
width unit(full_width, '%') | |
margin auto | |
overflow hidden | |
div[class^="grid_"] |
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
#!/bin/sh | |
# add a simple 'nuget' command to Mac OS X under Mono | |
# get NuGet.exe binary from http://nuget.codeplex.com/releases/view/58939 | |
# get Microsoft.Build.dll from a Windows .NET 4.0 installation | |
# copy to /usr/local/bin and Robert is your father's brother.... | |
# | |
PATH=/usr/local/bin:$PATH | |
mono --runtime=v4.0 /usr/local/bin/NuGet.exe $* |
request = require 'supertest' | |
scope = require 'nock' | |
app = require process.cwd() + '/app.coffee' | |
backend = require process.cwd() + 'lib/backend.coffee' | |
URL = | |
describe 'Collections', -> | |
describe 'show', -> | |
it "should return a 404 if the object doesn't exist", (done) -> | |
scope = nock(backend.url) |
module Example () where | |
import Network.HTTP | |
-- Non HTTPS | |
-- 1. Perform a basic HTTP get request and return the body | |
get :: String -> IO String | |
get url = simpleHTTP (getRequest url) >>= getResponseBody |
Problem: When linking to the raw version of a gist, the link changes with each revision.
Solution:
To return the first file from a gist: https://gist.github.com/[gist_user]/[gist_id]/raw/
To get a file from multi–file gist: https://gist.github.com/[gist_user]/[gist_id]/raw/[file_name]
# DOCKER-VERSION 0.4.8 | |
FROM ubuntu:12.04 | |
# install essentials | |
RUN apt-get install -y -q git | |
# Install rbenv | |
RUN git clone https://github.com/sstephenson/rbenv.git /usr/local/rbenv | |
RUN echo '# rbenv setup' > /etc/profile.d/rbenv.sh |
There are two ways of installing meld on osx (May 2023), using brew
and .dmg
package (from @yousseb). Since I found https://yousseb.github.io/meld/, I've installed it with .dmg
package, but having macOS Ventura Version 13.4 (22F66)
in place, it's not even starting for me. So I tried brew
installation, and the application is working as expected, including symlink to start it from the terminal.
brew install --cask meld
# set meld as your default git mergetool
var Promise = require('fantasy-promises'), | |
fl = "https://api.github.com/repos/fantasyland/", | |
// Pretend this URL is given by the user, not setTimeout | |
userInput = new Promise(function(resolve) { | |
setTimeout(function() { | |
resolve(fl + "fantasy-states"); | |
}, Math.random() * 500); | |
}), |
{ | |
"libs": [ | |
"browser", | |
"underscore", | |
"jquery" | |
], | |
"plugins": { | |
"node": {} | |
} | |
} |