Skip to content

Instantly share code, notes, and snippets.

View jookyboi's full-sized avatar

Rui Jiang jookyboi

View GitHub Profile
//Here is a small script to automate the creation of a point light. It creates a point light with a connected Physical Light. Alternatively it connects a physical Light to the selected Lights.
proc string create_Physical_Light(int $interior){
string $sel_lights[] = `ls -sl -dag -leaf -lights`;
string $phyLight = `mrCreateCustomNode -asUtility "" physical_light`;
string $blackbody;
if ($interior) {
$blackbody = `mrCreateCustomNode -asUtility "" mib_blackbody`;
} else {
var e = jQuery.Event("keydown");
e.which = 50; // # Some key code value
$("input").trigger(e);
file = file.substr(0, file.lastIndexOf(".")) + ".htm";
File.open(yourfile, 'w') { |file| file.write("your text") }
@jookyboi
jookyboi / Gemfile
Created September 20, 2013 01:40 — forked from leemour/Gemfile
source :rubygems
gem 'shotgun', :group=>:development
gem 'rack-cache'
gem 'sinatra', :require => 'sinatra/base'
gem 'sinatra-support'
gem 'haml'
ru:
devise:
confirmations:
confirmed: "Ваша учётная запись подтверждена. Теперь вы вошли в систему."
send_instructions: "В течение нескольких минут вы получите письмо с инструкциями по подтверждению вашей учётной записи."
send_paranoid_instructions: "Если ваш адрес email есть в нашей базе данных, то в течение нескольких минут вы получите письмо с инструкциями по подтверждению вашей учётной записи."
failure:
already_authenticated: "Вы уже вошли в систему."
inactive: "Ваша учётная запись ещё не активирована."
invalid: "Неверный адрес email или пароль."
request.env["HTTP_USER_AGENT"].match(/\(.*https?:\/\/.*\)/)
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
$(document).bind("contextmenu", function(event) {
event.preventDefault();
$("<div class='custom-menu'>Custom menu</div>")
.appendTo("body")
.css({top: event.pageY + "px", left: event.pageX + "px"});
});
postgres=# SELECT rolname FROM pg_roles;
+----------+
| rolname |
+----------+
| postgres |
| matsya1 |
+----------+
(2 rows)
 
postgres=#