Create droplet of your liking (ubuntu 12.10 x32)
ssh to root in terminal with your server ip
ssh [email protected]
Add ssh fingerprint and enter password provided in email
| %pyspark | |
| import matplotlib.pyplot as plt; plt.rcdefaults() | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| import StringIO | |
| def show(p): | |
| img = StringIO.StringIO() | |
| p.savefig(img, format='svg') |
Create droplet of your liking (ubuntu 12.10 x32)
ssh to root in terminal with your server ip
ssh [email protected]
Add ssh fingerprint and enter password provided in email
| … | |
| gem 'ruby-prof' |
Quick, take a guess, what's the first hop latency to your home wireless router?
Below 1ms, right? Yeah, you wish!
Below are results from a quick test on my home router (Linksys E1550). Some lessons learned:
| -- Basic HTTP stuff | |
| module Parser where | |
| import System.Environment | |
| import Data.List | |
| import Data.Maybe | |
| import Network.HTTP | |
| import Network.URI |
| module Example () where | |
| import Network.HTTP | |
| -- Non HTTPS | |
| -- 1. Perform a basic HTTP get request and return the body | |
| get :: String -> IO String | |
| get url = simpleHTTP (getRequest url) >>= getResponseBody |
| #!/usr/bin/env rake | |
| require 'rspec/core/rake_task' | |
| RSpec::Core::RakeTask.new(:spec => :dummy_app) do |t| | |
| t.pattern = File.expand_path('../spec/**/*_spec.rb', __FILE__) | |
| end | |
| task :default => :spec | |
| desc 'Generates a dummy app for testing' | |
| task :dummy_app => [:setup, :migrate] |
| import java.security.SecureRandom; | |
| import javax.crypto.spec.PBEKeySpec; | |
| import javax.crypto.SecretKeyFactory; | |
| import java.math.BigInteger; | |
| import java.security.NoSuchAlgorithmException; | |
| import java.security.spec.InvalidKeySpecException; | |
| /* | |
| * PBKDF2 salted password hashing. | |
| * Author: havoc AT defuse.ca |
| #!/bin/sh | |
| # This script will install Command Line Tools for Xcode on a fresh installation of OS X. | |
| # Usage: curl https://raw.github.com/gist/3053979/install-command-line-tools-for-xcode.sh | sh | |
| DMG='command_line_tools_for_xcode_june_2012.dmg' | |
| cd $HOME/Downloads | |
| if [ ! -f ./$DMG ]; then | |
| echo 'Command Line Tools for Xcode not downloaded.' |
| require 'thread' | |
| class Foo | |
| attr_reader :a | |
| attr_reader :assignment_count, :evaluation_count | |
| def initialize | |
| @a = nil | |
| @evaluation_lock = Mutex.new | |
| @assignment_lock = Mutex.new |