I hereby claim:
- I am colmarius on github.
- I am colmarius (https://keybase.io/colmarius) on keybase.
- I have a public key whose fingerprint is F2A6 4700 5AB9 3F22 8E30 9F3D 1701 A84E 226C 57CF
To claim this, I am signing this object:
# newly created stacks should be empty | |
# after one push stack size should be one | |
# after one push and one pop should be empty | |
# when pushed past limit stack overflows | |
# when empty stack popped should throw underflow | |
# when one is pushed one is popped | |
# when one and two are pushed two and one are popped | |
# when creating stack with negative size should throw illegal capacity | |
# when creating stack with zero capacity any push should overflow | |
# when one is pushed one is on top |
#!/usr/bin/env ruby | |
# Solved from https://docs.google.com/forms/d/1h6LtvCS3tVosk1-dbEsX54DsLxE6Xg9tTWUT2C-JqMk/viewform | |
hidden_string = 'bddpvout ejggfsfou gps qbttxpse b sfvtf opu Ep' | |
def rotr_word(word, number) | |
letters = word.split('') | |
.map do |letter| | |
(letter.ord + number).chr |
# After building a new Linode Ubuntu 13.04 image... | |
ssh root@linode-123 | |
# ... | |
uname -a | |
# Linux li348-235 3.12.9-x86_64-linode37 #1 SMP Mon Feb 3 10:01:02 EST 2014 x86_64 x86_64 x86_64 GNU/Linux | |
apt-get update | |
apt-get install -y linux-virtual grub-legacy-ec2 |
I hereby claim:
To claim this, I am signing this object:
# | |
# Playing with ephemeral gem | |
# | |
# - https://github.com/CoralineAda/ephemeral/ | |
class Base | |
include Ephemeral::Base | |
def initialize(args={}); args.each{|k,v| self.send("#{k}=", v)}; end | |
end |
Inspired by this tip
Example of upgrading PostgreSQL from 9.3 to latest 9.5
const todo = (state, action) => { | |
switch (action.type) { | |
case 'ADD_TODO': | |
return { | |
id: action.id, | |
text: action.text, | |
completed: false | |
}; | |
case 'TOGGLE_TODO': | |
if (state.id !== action.id) { |
This is the "Iris" dataset. Originally published at UCI Machine Learning Repository: Iris Data Set, this small dataset from 1936 is often used for testing out machine learning algorithms and visualizations (for example, Scatter Plot). Each row of the table represents an iris flower, including its species and dimensions of its botanical parts, sepal and petal, in centimeters.
The HTML page provides the basic code required to load the data and display it on the page (as JSON) using D3.js.
Built with blockbuilder.org
## | |
## Prefer mongodump/mongorestore instead of mongoexport/mongoimport, | |
## as it will "export" additional metadata, like indexes etc. | |
## | |
### Mongodump example | |
# Required: host, db, collection, out | |
# Optional: query (limit results) | |
mongodump --host mongodb1.example.net \ |