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
# 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 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 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 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 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
Given /^I want to see where I am$/ do | |
tmp = Tempfile.new 'culerity_results' | |
tmp << $browser.html | |
tmp.close | |
`konqueror #{tmp.path}` | |
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
If one wants to call MSSQL statements like this | |
declare @aha as varchar(4000); | |
set @aha='SELECT * FROM pubs.dbo.titles;'; | |
exec(@aha) | |
One have to use prepare/execute combo: | |
statement = dbconn.prepare( sql ) | |
results = statement.execute # vagy statement.run | |
Point is to prepare before execute |
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
require 'culerity' | |
Before do | |
$rails_server ||= Culerity::run_rails | |
sleep 5 | |
$server ||= Culerity::run_server | |
$browser = Culerity::RemoteBrowserProxy.new $server, {:browser => :firefox3#, | |
#:resynchronize => true, | |
#:javascript_exceptions=>true, | |
#:refresh_handler=> :waiting, |
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
bear-chef certificates # ls -la /etc/chef/ | |
total 28 | |
drwxr-xr-x 4 chef chef 4096 Apr 17 19:28 . | |
drwxr-xr-x 46 root root 4096 Apr 17 19:17 .. | |
-rw-r--r-- 1 root root 0 Mar 26 15:51 .keep_app-admin_chef-0 | |
-rw-r--r-- 1 chef chef 0 Apr 17 18:56 .keep_app-admin_chef-server-0 | |
-rw-r--r-- 1 chef chef 0 Mar 26 16:53 .keep_app-admin_chef-solr-0 | |
drwx------ 2 chef chef 4096 Apr 17 19:35 certificates | |
drwxr-xr-x 8 root root 4096 Apr 1 14:46 chef-repo | |
-rw-r--r-- 1 chef chef 496 Mar 26 15:51 client.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
bear-chef chef # egrep -v '^\s*(#|$)' /etc/chef/server.rb | |
log_level :debug | |
log_location '/var/log/chef/server.log' | |
ssl_verify_mode :verify_none | |
chef_server_url 'http://localhost:4000' | |
signing_ca_path '/var/lib/chef/ca' | |
signing_ca_cert '/var/lib/chef/ca/cert.pem' | |
signing_ca_key '/var/lib/chef/ca/key.pem' | |
couchdb_database 'chef' | |
cookbook_path [ '/var/lib/chef/cookbooks', '/var/lib/chef/site-cookbooks' ] |
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
# Chef telepítés. | |
# Itt lehet infókat találni arról, hogy kell telepíteni chef -et. | |
# Először ezt csináljuk végig. | |
#http://github.com/veszig/chef-overlay | |
#http://wiki.opscode.com/pages/viewpage.action?pageId=1180116 | |
#http://github.com/opscode/chef-repo | |
### | |
# Szever |
OlderNewer