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
{ | |
"nonce": "0x0000000000000042", | |
"difficulty": "0x40000", | |
"alloc": { | |
"bbbbbaaaaa82db86a35502193b4c6ee9a76ebe8f": { | |
"balance": "10015200000000000000000" | |
} | |
}, | |
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000", | |
"coinbase": "0x0000000000000000000000000000000000000000", |
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
class Media | |
belongs_to :mediable, :polymorphic => true | |
end | |
class Project | |
has_many :media, :as => :mediable | |
end | |
class Post | |
has_many :media, :as => :mediable |
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 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. | |
# |
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
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 |
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 | |
# 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 | |
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
Verifying that +maran is my Bitcoin username. You can send me #bitcoin here: https://onename.io/maran |
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 -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 |
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 -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 |
NewerOlder