An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
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 | |
echo "Generating an SSL private key to sign your certificate..." | |
openssl genrsa -des3 -out myssl.key 1024 | |
echo "Generating a Certificate Signing Request..." | |
openssl req -new -key myssl.key -out myssl.csr | |
echo "Removing passphrase from key (for nginx)..." | |
cp myssl.key myssl.key.org | |
openssl rsa -in myssl.key.org -out myssl.key |
#! /usr/bin/env python2 | |
''' | |
Register a mDNS/DNS-SD alias name for your computer using the Avahi daemon | |
This script will register an alternate CNAME alias besides your hostname, | |
which could be useful for ex. when serving several http virtual hosts to | |
your ffriends on the local network and you don't want to make them configure | |
their /etc/hosts. | |
Why a CNAME? You could also publish your current address with avahi-publish-address |
#!/bin/bash | |
# | |
# Whitelist Pingdom probe-servers in iptables. | |
# | |
# Create a chain called "PINGDOM" and jump to it somewhere before | |
# the final REJECT/DROP, e.g. | |
# | |
# # New chain for Pingdom rules | |
# :PINGDOM - [0:0] | |
# |
#!/bin/bash | |
# Convert a Github Flavored Markdown Syntax file to HTML | |
# | |
# The MIT License (MIT) | |
# Copyright © 2012 Evertton de Lima <[email protected]> | |
# http://evertton.mit-license.org/ | |
# Stylesheet feature by Dan Untenzu <[email protected]> | |
# | |
# Requirements: cURL (sudo apt-get install curl) |
sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \; |
#!/bin/bash | |
# | |
# long2ip - Bash example to convert integer ip to long | |
# | |
# Example: long2ip 201691728 | |
# | |
long2ip() { | |
local ip=$1 | |
echo $((ip >> 24 & 255))"."$((ip >> 16 & 255))"."$((ip >> 8 & 255 ))"."$((ip & 255)) |
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
Our Virtual Machines are provisioned using Vagrant from a Linux base box to run using VirutalBox. If the Hard Disk space runs out and you cannot remove files to free-up space, you can resize the Hard Disk using some VirtualBox and Linux commands.
The following steps assume you've got a set-up like mine, where: