An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
import maya.cmds as mc | |
import math | |
import random | |
def uniformRandom(): | |
for i in range(100): | |
mc.polyCube() | |
x = random.uniform(-1,1) * 5 # these are the same | |
z = random.random() * 10 - 5 # this does the same as above | |
mc.move(x,0.,z) |
#!/bin/bash | |
# bash generate random alphanumeric string | |
# | |
# bash generate random 32 character alphanumeric string (upper and lowercase) and | |
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
# bash generate random 32 character alphanumeric string (lowercase only) | |
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1 |
<?php | |
/** | |
* Plugin Name: Set featured image | |
* Plugin URI: http://wpengineer.com/2460/set-wordpress-featured-image-automatically/ | |
* Description: Set featureed image automaticly on save post/page | |
* Version: 1.0.1 | |
* Author: Frank Bültge | |
* Author URI: http://bueltge.de | |
* License: GPLv3 | |
*/ |
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.
// Rotation Around a Point | |
// *********************** | |
// To acheive rotation around a given point | |
// - translate to that point | |
// - rotate | |
// - then translate back | |
// (note: in Processing this last step is implicit | |
// since draw() resets all transformations | |
// each time it runs.) |
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |