Skip to content

Instantly share code, notes, and snippets.

View jookyboi's full-sized avatar

Rui Jiang jookyboi

View GitHub Profile
@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'
//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 {
#Model
@user.should have(1).error_on(:username) # Checks whether there is an error in username
@user.errors[:username].should include("can't be blank") # check for the error message
#Rendering
response.should render_template(:index)
#Redirecting
response.should redirect_to(movies_path)
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php
*/
$args = array(
// PhantomJS Cheatsheet
$ brew update && brew install phantomjs // install PhantomJS with brew
phantom.exit();
var page = require('webpage').create();
page.open('http://example.com', function() {});
page.evaluate(function() { return document.title; });
@jookyboi
jookyboi / foobar.md
Last active February 18, 2019 16:35 — forked from rust-play/playground.rs
Code shared from the Rust Playground

ok