--- Log opened Sat Feb 23 03:34:59 2019
03:34 johnhcock ([email protected]) has joined ##music
03:34 Irssi: ##music: Total of 56 nicks (1 ops, 0 halfops, 0 voices, 55 normal)
03:35 Irssi: Join to ##music was synced in 3 secs
03:49 <artao> ... totally off-topic ...
03:49 <artao> Is it okay to sell something on eBay if you don't immediately have the funds to ship it?
04:02 Cuckoo (~Cuckoo@unaffiliated/cuckoo) has joined ##music
04:11 <johnhcock> Hi! Anybody seen xybre recently? Or perhaps have his contact info?
04:30 StarPulse ([email protected]) has joined ##music
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
root@HP:/home/myuser# lsblk | |
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT | |
fd0 2:0 1 4K 0 disk | |
sda 8:0 0 149,1G 0 disk | |
├─sda1 8:1 0 148,1G 0 part / | |
├─sda2 8:2 0 1K 0 part | |
└─sda5 8:5 0 1022M 0 part [SWAP] | |
sdb 8:16 1 1,8G 0 disk | |
└─sdb1 8:17 1 1,8G 0 part /media/myuser/0C2C-FFEF | |
sr0 11:0 1 1024M 0 rom |
Live test case: http://code.runnable.com/VhkAc9j8MyMneWeP/variable-problem
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 c | |
puts "Some content" | |
end | |
def b | |
puts "Some content" | |
end | |
def a | |
puts "Some content" |
airplane.rb
% ruby airplane.rb
sferik/twitter demo app in Rails
- Display tweets from a selection of users
- Display all tweets in and around Chicago, IL
- Collect tweets in the background using delayed_job_active_record or similar
- Save tweets to db (helps avoid rate limits)
- Query each stream separately and then mix them together manually in the model (e.g. ordered chronologically)
Live app which you can run on the fly: http://code.runnable.com/Vao93VmSdpgdQ0lO/twitter-feed-rails
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
== 20120921162512 AddMetaDataToForumThreads: migrating ======================== | |
-- execute("CREATE EXTENSION IF NOT EXISTS hstore") | |
rake aborted! | |
StandardError: An error has occurred, this and all later migrations canceled: | |
PG::InvalidParameterValue: ERROR: version to install must be specified | |
: CREATE EXTENSION IF NOT EXISTS hstore/usr/home/www/_myapp/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.10/lib/active_record/connection_adapters/postgresql/database_statements.rb:128:in `async_exec' | |
/usr/home/www/_myapp/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.10/lib/active_record/connection_adapters/postgresql/database_statements.rb:128:in `block in execute' |
Save items fetched via REST Client to database
Live app which you can run on the fly: http://runnable.com/VXH_qU3Kk_F-ndtP/rest-client-test
app/controllers/main_controller.rb
class MainController < ApplicationController
def index
REST Client, Delayed Job and Ajax
Trying to load some items from this external API in the background and save to database. When done, show them to the client using Ajax.
Live app which you can run on the fly: http://runnable.com/VXIdQ6KuRrYPdhKs/rest-client-ajax (remember to run bin/delayed_job start
before hitting the big green Run button)
config/routes.rb
get '/check_items_loaded', to: 'main#check_items_loaded', as: :check_items_loaded
NewerOlder