This file contains hidden or 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
describe "#list_units" do | |
let(:unit_list) do | |
'unit' => [ | |
{ | |
'name' => 'foo.service' | |
'currentstate' => 'a' | |
'desiredstate' => 'b' | |
'options' => 'c' | |
} | |
] |
This file contains hidden or 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
### app access token | |
graph = Koala::Facebook::OAuth.new APP_ID, APP_SECRET | |
graph.get_app_access_token # => APP_TOKEN | |
### create test users with permissions | |
test_users = Koala::Facebook::TestUsers.new app_id: APP_ID, secret: APP_SECRET | |
user = test_users.create true, 'email,user_birthday,user_posts', name: 'Bob' | |
# => | |
# { "id" => USER_ID, | |
# "access_token" => USER_ACCESS_TOKEN, |
This file contains hidden or 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
# SSL self signed localhost for rails start to finish, no red warnings. | |
# 1) Create your private key (any password will do, we remove it below) | |
$ openssl genrsa -des3 -out server.orig.key 2048 | |
# 2) Remove the password | |
$ openssl rsa -in server.orig.key -out server.key |
This file contains hidden or 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 MyApp.CarsController extends Batman.ApplicationController | |
# Appears to work the same way MyApp.CarsIndexView#viewDidAppear | |
@afterAction only: "index", -> | |
$('table').dataTable() | |
index: (params) -> | |
@set('cars', MyApp.Car.get('all')) |
This file contains hidden or 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
# TODO | |
# tömbként tároljuk az lámpa sorokat | |
# lámp sorok tömbe tartalmazzák a state -ket | |
# másodperc alapján eldöntjük az első sort | |
# óra / 5 kidja a második sorban színes lámpák számát annyi indexet felkapcsolunk | |
# óra mod 5 vissza adja a harmadik sor szines lámpák számát | |
# perc / 5 negyedik sor minden 3 piros | |
# pert mod 5 | |
# | |
class BerlinClock |
This file contains hidden or 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
~/.tmux.conf | |
set-option -g default-terminal xterm-256color | |
set-window-option -g xterm-keys on | |
# The key was that | |
echo $TERM | |
# in tmux returned screen which is why ctrl+up did not looked up history now it is | |
xterm-256color | |
Though it works fine on ubuntu with echo $TERM screen |
This file contains hidden or 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
http://speakmy.name/2013/04/02/concurrent-programming-and-threads-in-ruby-reading-list/ | |
Concurrent Programming and Threads in Ruby - a reading list | |
02 April 2013 | |
Many rubyists consider threads in Ruby as somewhat of an arcane knowledge, though in reality they’re a very well researched and understood concept. Of course, writing effective multithreaded concurrent programs requires certain amount of knowledge and discipline from the programmer, but there’s nothing that a smart one can’t learn if he wants to. | |
To help with the task, awesome @brainopia compiled a list of recommended reading on the topic of concurrency and threads. All kudos go to @brainopia, and the original list in Russian as available as a gist here: |
This file contains hidden or 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
Before do |scenario| | |
DeferredGarbageCollection.start | |
end | |
After do |scenario| | |
DeferredGarbageCollection.reconsider | |
end | |
at_exit do | |
DeferredGarbageCollection.stop |
This file contains hidden or 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
actions | |
activities | |
admin_stats | |
billing | |
common | |
companies | |
custom_attributes | |
customers | |
devise | |
email addresses |
This file contains hidden or 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
git clone svn://host/repo --stdlayout | |
git co -b local_trunk trunk | |
# pull | |
git svn rebase | |
#push | |
git svn dcommit |