This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# | |
# Download lecture videos of courses from Coursera (http://www.coursera.org). | |
# | |
# Install requirements: | |
# | |
# $ gem install curb trollop nokogiri capybara ruby-progressbar | |
# | |
# Example -- Download all video lectures of courses "Calculus: Single Variable" | |
# and "Introduction to Astronomy": |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ways to execute a shell script in Ruby | |
# Example Script - Joseph Pecoraro | |
cmd = "echo 'hi'" # Sample string that can be used | |
# 1. Kernel#` - commonly called backticks - `cmd` | |
# This is like many other languages, including bash, PHP, and Perl | |
# Returns the result of the shell command | |
# Docs: http://ruby-doc.org/core/classes/Kernel.html#M001111 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "###### Installing software using nitrous' parts package manager ######" | |
parts install apr | |
parts install libmcrypt | |
parts install heroku_toolbelt | |
parts install apr_util | |
echo "" | |
echo "###### Installing php dependency manager composer" | |
parts install composer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
fancy_echo "Installing homesick, an alternative for managing dotfiles ..." | |
gem install homesick | |
fancy_echo "Installing Dropbox ..." | |
cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf - | |
fancy_echo "Save local configuration files from being overwritten by my symlinked dotfiles" | |
if [ ! -f "$HOME/.zshrc" ]; then | |
mv $HOME/.zshrc $HOME/.zshrc.local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
sudo apt-get update | |
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties | |
echo "##########################################" | |
echo "Installing ruby" | |
echo "##########################################" | |
echo "Instructions courtesy: gorails.com https://gorails.com/setup/ubuntu/14.04" | |
if [ ! -f "$HOME/.rbenv" ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Modified version of Jeffrey Way's Vagrant Laravel setup script | |
echo "--- Good morning, master. Let's get to work. Installing now. ---" | |
echo "--- Updating packages list ---" | |
sudo apt-get update | |
echo "--- MySQL time ---" | |
#sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root' | |
#sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Barryvdh\Elfinder; | |
use Illuminate\Support\Facades\View; | |
use Illuminate\Support\Facades\Config; | |
use Illuminate\Support\Facades\Response; | |
class ElfinderController extends \Controller | |
{ | |
protected $package = 'laravel-elfinder'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Making my dev setup portable with a script that can set it up on any new server (running ubuntu) I come across | |
sudo apt-get update | |
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties | |
echo "##########################################" | |
echo "Get vim" | |
echo "##########################################" | |
sudo apt-get install vim -y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "##########################################" | |
echo "Installing ruby" | |
echo "##########################################" | |
echo "Instructions courtesy: gorails.com https://gorails.com/setup/ubuntu/14.04" | |
if [ ! -f "$HOME/.rbenv" ]; then | |
git clone git://github.com/sstephenson/rbenv.git .rbenv | |
fi | |
#echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -ex | |
# Paste this into ssh | |
# curl https://gist.githubusercontent.com/smcabrera/143a72e9ef8729e97a67/raw/bd3089511fa43fc73c6943bc59685918e19a040b/bootstrap_homeshick.sh | sh | |
# When forking, you can get the URL from the raw (<>) button. | |
### Set some command variables depending on whether we are root or not ### | |
# This assumes you use a debian derivate, replace with yum, pacman etc. | |
aptget='sudo apt-get' | |
chsh='sudo chsh' |
OlderNewer