Only uses modules included in AciveState basic install. Created as a function that can be imported or run.
Forked Gist from:
- fork using Hurl.it
- https://gist.github.com/eteq/1750715
- http://stackoverflow.com/a/11621536
See:
# Allow open-uri to follow unsafe redirects (i.e. https to http). | |
# Relevant issue: | |
# http://redmine.ruby-lang.org/issues/3719 | |
# Source here: | |
# https://github.com/ruby/ruby/blob/trunk/lib/open-uri.rb | |
module OpenURI | |
class <<self | |
alias_method :open_uri_original, :open_uri | |
alias_method :redirectable_cautious?, :redirectable? |
#!/usr/bin/php | |
<?php | |
$repos = array(); | |
exec('find -type d -name .git | sed -e "s/\.git//"', $repos); | |
foreach ($repos as $repo) { | |
$status = shell_exec("cd $repo && git status"); | |
if (false == strpos($status, 'nothing to commit (working directory clean)')) { | |
echo "$repo\n" . str_repeat('-', strlen($repo)) . "\n$status\n\n"; | |
} | |
} |
#!/usr/bin/env bash | |
apt-get -y update | |
apt-get -y install build-essential zlib1g-dev libssl-dev libxml2-dev libxslt-dev libreadline6-dev libyaml-dev | |
# apt-get -y install libmysqlclient-dev # uncomment for mysql support | |
cd /tmp | |
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p286.tar.gz | |
tar -xvzf ruby-1.9.3-p286.tar.gz | |
cd ruby-1.9.3-p286/ | |
./configure --prefix=/usr/local | |
make |
import os | |
import os.path | |
import re | |
import fabric.api | |
import fabric.tasks | |
SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) | |
SUDO_PREFIX = re.compile(r'/(root|sudo)_?', re.I) |
# monkey-patch Chef Git Provider | |
# to raise the default ShellOut timeout setting | |
# because this repo can take over 10min | |
# to clone from github.com | |
class ::Chef::Provider::Git | |
def clone # based on opscode/chef commit b86c5b06 | |
converge_by("clone from #{@new_resource.repository} into #{@new_resource.destination}") do | |
remote = @new_resource.remote | |
args = [] |
apt-get -y update | |
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev libxslt-dev libxml2-dev git | |
cd /tmp | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p429.tar.gz | |
tar -xvzf ruby-1.9.3-p429.tar.gz | |
cd ruby-1.9.3-p429/ | |
./configure --prefix=/usr/local | |
make | |
make install | |
gem install bundler berkshelf |
Param ( | |
[string]$SubjectName = $env:COMPUTERNAME, | |
[int]$CertValidityDays = 365, | |
$CreateSelfSignedCert = $true | |
) | |
#region function defs | |
Function New-LegacySelfSignedCert | |
{ |
# install openjdk | |
sudo apt-get install openjdk-7-jdk | |
# download android sdk | |
wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz | |
tar -xvf android-sdk_r24.2-linux.tgz | |
cd android-sdk-linux/tools | |
# install all sdk packages |
using UnityEditor; | |
using System; | |
using System.Collections.Generic; | |
class BuildScript { | |
static string[] SCENES = FindEnabledEditorScenes(); | |
static string APP_NAME = "AngryBots"; | |
static string TARGET_DIR = "target"; |
Only uses modules included in AciveState basic install. Created as a function that can be imported or run.
Forked Gist from:
See: