An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
| // Configurable variables | |
| // ⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻ | |
| // Absolute height of body text, in pixels | |
| $base-font-size: 16px !default; | |
| // Absolute height of one line of type, in pixels | |
| $base-line-height: 24px !default; | |
| // The font unit to use when returning values in rhythm functions |
An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
| # https://github.com/matplotlib/matplotlib/issues/881 | |
| # Several of the ColorBrewer maps are "qualitative", meaning | |
| # they are just a group of colors that can be used together | |
| # for categories of data. So I remapped Accent to segments | |
| # instead of continuous: | |
| # Actually, these should be used with ListedColormap, and | |
| # the number of colors should depend on the number of | |
| # categories in the data, with colors removed from the | |
| # list in a certain order? |
| newpg=9.6.1 # set to new PG version number | |
| oldpg=`pg_config --version | cut -d' ' -f2` | |
| # PG 96. upgrades the readline to v7, which breaks anything linked against readline v6, like ruby via ruby-build. | |
| # I *think* this should prevent it from installing v7. But if weird shit happens with various rubies, | |
| # you'll have to reinstall them. | |
| brew pin readline | |
| # Stop current Postgres server | |
| brew services stop postgresql |
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:
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| import scipy.optimize as so | |
| def find_confidence_interval(x, pdf, confidence_level): | |
| return pdf[pdf > x].sum() - confidence_level | |
| def density_contour(xdata, ydata, nbins_x, nbins_y, ax=None, **contour_kwargs): | |
| """ Create a density contour plot. |
| #!/usr/bin/env python | |
| import bz2 | |
| import datetime | |
| import os | |
| import sys | |
| import time | |
| import urllib2 | |
| import warnings |
| module.exports = function(grunt) { | |
| // Project configuration. | |
| grunt.initConfig({ | |
| pkg: grunt.file.readJSON('package.json'), | |
| connect: { | |
| server: { | |
| options: {}, | |
| } | |
| }, |
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |