An introduction to curl using GitHub's API
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
wget -q -O - https://jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add - | |
sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list' | |
sudo apt-get update | |
sudo apt-get install jenkins | |
# exit 0 |
#!/bin/sh | |
JAVA_VERSION=`echo "$(java -version 2>&1)" | grep "java version" | awk '{ print substr($3, 2, length($3)-2); }'` | |
echo $JAVA_VERSION |
#!/bin/bash | |
# Ref: https://docs.newrelic.com/docs/servers/new-relic-servers-linux/installation-configuration/servers-installation-ubuntu-debian | |
# https://docs.newrelic.com/docs/agents/python-agent/installation-configuration/python-agent-integration | |
# Usage: $0 <your key> | |
YOUR_LICENSE_KEY=$1 | |
# define spinner function for slow tasks | |
spinner() | |
{ |
development: | |
adapter: mysql2 | |
encoding: utf8 | |
database: my_database | |
username: root | |
password: |
#!/usr/bin/env bash | |
# repository | |
cd /tmp | |
wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm | |
rpm -Uvh epel-release-6-7.noarch.rpm | |
# system update | |
yum -y update | |
yum -y groupinstall "Development Tools" | |
yum -y install libxslt-devel libyaml-devel libxml2-devel gdbm-devel libffi-devel zlib-devel openssl-devel libyaml-devel readline-devel curl-devel openssl-devel pcre-devel git memcached-devel valgrind-devel mysql-devel ImageMagick-devel ImageMagick |
#!/bin/bash | |
# Source: http://toomuchdata.com/2012/06/25/how-to-install-python-2-7-3-on-centos-6-2/ | |
yum -y groupinstall "Development tools" | |
yum -y install zlib-devel | |
yum -y install bzip2-devel openssl-devel ncurses-devel sqlite-devel mysql-devel | |
wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2 | |
if [ ! -f Python-2.7.3.tar.bz2 ] ;then | |
echo "Python-2.7.3.tar.bz2 not found" |
#!/bin/bash | |
#Ask user to enter database name and save input to dbname variable | |
read -p "Please Enter Database Name:" dbname | |
#checking if database exist | |
mysql -Bse "USE $dbname" 2> /dev/null | |
#if database exist: | |
if [ $? -eq 0 ]; then |
# http://stackoverflow.com/questions/1254366/problem-installing-rmagick-rubygem-on-centos-5/7766705#7766705 | |
# Uninstalled ImageMagick 6.5.4-9 and the delegate libraries that I had installed from source | |
yum install ImageMagick | |
yum install ImageMagick-devel | |
curl -O http://www.zacharywhitley.com/linux/rpms/fedora/core/6/i386/msttcorefonts-2.0-1.noarch.rpm | |
rpm -ivh msttcorefonts-2.0-1.noarch.rpm | |
ln -s /usr/share/fonts/msttcorefonts/ /usr/share/fonts/default/TrueType | |
gem install rmagick -v 1.15.17 --no-rdoc --no-ri |
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'terminal-table' | |
require 'json' | |
rows = [] | |
data = JSON.parse(ARGF.read) |