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/bash | |
| mkdir toolchain | |
| cd toolchain | |
| wget ftp://sources.redhat.com/pub/newlib/newlib-1.19.0.tar.gz | |
| wget http://ftp.gnu.org/gnu/gdb/gdb-7.2.tar.gz | |
| wget http://ftp.gnu.org/gnu/binutils/binutils-2.21.tar.bz2 | |
| wget http://ftp.gnu.org/gnu/gcc/gcc-4.6.0/gcc-core-4.6.0.tar.bz2 |
An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist.
Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).
| /* | |
| * http://www.myersdaily.org/joseph/javascript/md5-text.html | |
| */ | |
| (function() { | |
| var md5cycle = function(x, k) { | |
| var a = x[0], b = x[1], c = x[2], d = x[3]; | |
| a = ff(a, b, c, d, k[0], 7, -680876936); |
| library(rgdal) # R wrapper around GDAL/OGR | |
| library(ggplot2) # for general plotting | |
| library(ggmaps) # for fortifying shapefiles | |
| # First read in the shapefile, using the path to the shapefile and the shapefile name minus the | |
| # extension as arguments | |
| shapefile <- readOGR("path/to/shapefile/", "name_of_shapefile") | |
| # Next the shapefile has to be converted to a dataframe for use in ggplot2 | |
| shapefile_df <- fortify(shapefile) |
| %% Make everything look better. | |
| %% http://tex.stackexchange.com/questions/553/what-packages-do-people-load-by-default-in-latex | |
| %% http://www.howtotex.com/packages/9-essential-latex-packages-everyone-should-use/ | |
| \usepackage{microtype} | |
| %% Shrink space around figures. | |
| %% This beats manually adding negative \vspace commands everywhere. | |
| %\setlength{\textfloatsep}{0pt} | |
| %\setlength{\textfloatsep}{20pt plus 2pt minus 4pt} | |
| %\setlength{\textfloatsep}{10pt plus 2pt minus 4pt} |
| # Defaults / Configuration options for homebridge | |
| # The following settings tells homebridge where to find the config.json file and where to persist the data (i.e. pairing and others) | |
| HOMEBRIDGE_OPTS=-U /var/lib/homebridge | |
| # If you uncomment the following line, homebridge will log more | |
| # You can display this via systemd's journalctl: journalctl -f -u homebridge | |
| # DEBUG=* |
| zh = 'U+5EB8' | |
| print(zh) # U+5EB8 | |
| zh = '\u5EB8' | |
| print(zh) # 庸 | |
| zh = '\\u5EB8' | |
| print(zh) # \\u5EB8 | |
| print(zh.decode('unicode-escape')) # AttributeError: 'str' object has no attribute 'decode' | |
| print(zh.encode('ascii').decode('unicode-escape')) # 庸 |