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 my Blockstack ID is secured with the address 1AqiJqy5pQXe8dpMEH6WoEPeXSyB5XBy4d https://explorer.blockstack.org/address/1AqiJqy5pQXe8dpMEH6WoEPeXSyB5XBy4d |
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
SwiftsBot : djonny88_2 has won the coin toss! Added 250,000 to djonny88_2 who now has 2,000,000. crash2burn , you now have 78,594,288. | |
SwiftsBot : swiftors_enemy has won the coin toss! Added 600,000 to swiftors_enemy who now has 1,200,056. crash2burn , you now have 77,994,288. | |
SwiftsBot : countrygiirl0006 has won the coin toss! Added 500,000 to countrygiirl0006 who now has 2,545,200. crash2burn , you now have 77,494,288. | |
SwiftsBot : alcaninee has won the coin toss! Added 1,000,000 to alcaninee who now has 18,268,913. crash2burn , you now have 76,494,288. | |
SwiftsBot : alcaninee has won the coin toss! Added 2,000,000 to alcaninee who now has 20,268,913. crash2burn , you now have 74,494,288. | |
SwiftsBot : crash2burn has won the coin toss! Added 5,000,000 to crash2burn who now has 79,494,288. masteryash, you now have 16,275,695. | |
SwiftsBot : masteryash has won the coin toss! Added 10,000,000 to masteryash who now has 26,275,695. crash2burn , you now have 69,494,288. | |
SwiftsBot : masteryash has won the coin toss! Added |
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
var http = require('http') | |
function Wat() { | |
this.get = function(cb) { | |
var options = { | |
host: "localhost", | |
port: "3030", | |
path: "", | |
headers: {'Content-Type': 'application/json'}, | |
method: 'GET', |
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
var http = require('http') | |
function Wat() { | |
} | |
Wat.prototype.get = function(cb) { | |
var options = { | |
host: "http://whatevaljksdskajd.com", | |
port: "80", |
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
module.exports = function(redisClient,prefix) { | |
var Autocomplete = {}; | |
Autocomplete.prefix = prefix; | |
Autocomplete.terminal = "+"; | |
Autocomplete.add = function(word, next) { | |
function add(letters, key, last, x) { | |
var letter = last ? Autocomplete.terminal : letters[x]; | |
var score = last ? 0 : letter.charCodeAt(0); |
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
def awesome(x,y) | |
x = x*(Math::PI/180) | |
y = y*(Math::PI/180) | |
(Math.atan2(Math.sin(x - y), Math.cos(x - y))/(Math::PI/180)).abs | |
end |
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
# Ruby bug or is it part of the "rules" that you cannot do this: | |
# Alone, works fine | |
>> 'a'.gsub("'",'\\\'') | |
=> "a" | |
# Inside a string in #{} - bombs | |
>> "hi #{'a'.gsub("'",'\\\'')}" | |
[just waits for another "] | |
" |
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
# NOTE: The sequel version on these machines may be a tiny bit off, but as far as I understand there wasn't any changes to this kind of stuff. | |
# ruby 1.8 | |
irb(main):024:0> Login.filter(:created_at > Time.now) | |
=> #<Sequel::MySQL::Dataset: "SELECT * FROM `logins` WHERE (`created_at` > '2009-06-25 23:15:57')"> | |
# ruby 1.9 | |
irb(main):006:0> Login.filter(:created_at > Time.now) | |
ArgumentError: comparison of Symbol with Time failed |
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
# application.rb | |
module Merb | |
class Request | |
def account | |
subdomains(0).first | |
end | |
end | |
end | |
# router.rb |
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
## Note, this blows up even worse if you use something | |
## with /'s in it ie /blogposts/~~http://www.example.com~~ | |
## it wont even recognize the route as it is now. | |
## Without /'s it currently appears to pass the regex as the id, not the matched text | |
describe "a resource route with a regex id" do | |
before :each do | |
Merb::Router.prepare do | |
with(:id => %r'~~(.*)~~') { resources :blogposts } |
NewerOlder