Skip to content

Instantly share code, notes, and snippets.

@maran
maran / install
Last active August 29, 2015 14:01
Ubuntu 14.04 Ethereum Go install
#!/bin/bash -i
# This script will install Go & QML
# Please download and make it executable and run it as such to make sure the script reloads bashrc
# wget https://gist.githubusercontent.com/maran/8dc397ed79331f16e284/raw -O install
# chmod +x install
# ./install
VERSION="1.2.2"
function fromPkg(){
sudo apt-get install -y golang
#!/bin/bash -i
# This script will install Ethereum-Go and all dependencies.
# Please download and make it executable and run it as such to make sure the script reloads bashrc
# wget https://gist.github.com/maran/2d69089ed5ea3f83fde8 -O install
# chmod +x install
# ./install
if ! lsb_release -sr | grep 14.04 > /dev/null; then
echo "This script is made for Ubuntu 14.04, this probably won't work."
echo -p "Do you want to try it anyway? (y/n) " -n 1 -r
Verifying that +maran is my Bitcoin username. You can send me #bitcoin here: https://onename.io/maran
@maran
maran / Unattended Rails (Passenger, Ruby Enterprise) Stack
Created December 17, 2008 20:24
Unattended Rails (Passenger, Ruby Enterpise) Stack
#!/bin/bash
# Unattended REE/Passenger installation
# Source: http://weblog.brightlight-ict.nl/2008/12/unattended-passenger-ruby-enterprise-installation-on-ubuntu-8/
# 15/03/09 Updated to use latest r.e.e. and passenger 2.1 and rewrote bits thanks to the comments left on my blog. Thanks guys
if [ "$(whoami)" != "root" ]; then
echo "You need to be root to run this!"
exit 2
fi
class SimpleMailer
require 'net/smtp'
attr_accessor :email_from, :email_to
def initialize(email_from, email_to)
@email_from, @email_to = email_from, email_to
end
def happy_mail
message = <<MSG
#!/usr/bin/env ruby
#
# usage: script/server_restarter
#
# Rails autoloading, while nice in theory, frequently doesn't work. Since Rails 2.3+
# is so fast when completely reloading the server, I wrote this script to listen to the
# given directories, and kill/restart the server when any file is changed.
#
# It's quick, simple, and it reliably reloads your application when changes are made.
#
class Media
belongs_to :mediable, :polymorphic => true
end
class Project
has_many :media, :as => :mediable
end
class Post
has_many :media, :as => :mediable
{
"nonce": "0x0000000000000042",
"difficulty": "0x40000",
"alloc": {
"bbbbbaaaaa82db86a35502193b4c6ee9a76ebe8f": {
"balance": "10015200000000000000000"
}
},
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x0000000000000000000000000000000000000000",
@maran
maran / _rounded.sass
Created July 23, 2011 20:28
rounded corners
@mixin rounded-corner($radius: 5px)
-moz-border-radius: $radius
-webkit-border-radius: $radius
border-radius: $radius
@mixin rounded-top-left-corner($radius: 5px)
-moz-border-radius-topleft: $radius
-webkit-border-top-left-radius: $radius
border-top-left-radius: $radius
@maran
maran / rollback.sh
Created September 1, 2011 15:20
Rollback to 1.3.2
#!/bin/bash
wget http://git.deluge-torrent.org/deluge/snapshot/deluge-1.3.2.tar.gz
tar -zxvf deluge-1.3.2.tar.gz
virtualenv ~/deluge
source ~/deluge/bin/activate
cd ~/deluge-1.3.2
sed -ibackup s/-dev// setup.cfg
python setup.py clean -a
python setup.py build
python setup.py install