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
html = ''' | |
<table class='dashboard'> | |
<tr> | |
<td> | |
<div class="books_list"></div> | |
<div class = courses_list"></div> | |
</td> | |
<td> | |
<div class = "documnets_list"></div> | |
</td> |
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
file = File.open '...' | |
Lang.ruby(file, :buffer => 2) | |
Lang.python(file, :buffer => 3) | |
Lang.go(file, :buffer => 4) | |
Lang.javascript(file, :buffer => 12) | |
Lang.java(file, :buffer => 6) | |
file = File.open '...' | |
Lang.ruby file, :buffer => 2 | |
Lang.python file, :buffer => 3 |
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
file = File.open '...' | |
Lang.ruby(file, :buffer => 2) | |
Lang.python(file, :buffer => 3) | |
Lang.go(file, :buffer => 4) | |
Lang.javascript(file, :buffer => 12) | |
Lang.java(file, :buffer => 6) | |
file = File.open '...' | |
Lang.ruby file, :buffer => 2 | |
Lang.python file, :buffer => 3 |
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 create | |
attrs = params[:group_question] | |
group_id = params[:group_id] | |
if @group = Group.find group_id | |
@question = _user.group_question group, attrs | |
@result = @question.errors.messages.map{|k,v| "#{v[0]}<br/>" } unless @question.save | |
end | |
json_only_action | |
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
def index | |
id = params[:group_id] | |
group = Group.find id | |
@questions = group.questions | |
@allow = _user.allowed? group | |
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
def index | |
@g_questions = GroupQuestion.where('group_id = ?',params[:group_id]) if params[:group_id].present? | |
group = Group.find(params[:group_id]) | |
@allow = group.instructor_id == _user.id | |
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 model.is_a?(Product) | |
= form_for purchase, :url => [model,purchase], :method => :post do |f| | |
... |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Wistia Upload Widget via API </title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
<style> | |
#wistia { width: 500px; height: 75px; } | |
</style> | |
</head> | |
<body> |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html> | |
<head> | |
<title>Tester</title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> | |
</head> | |
<body> | |
<div id="wistia-upload-widget" style="width: 500px; height: 75px;"></div> | |
<div id="wistia-upload-widget-2" style="width: 500px; height: 75px;"></div> | |
<div id="wistia-upload-widget-3" style="width: 500px; height: 75px;"></div> |
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
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/[\1]/' | |
} | |
function precmd() { | |
PROMPT="%n@%m %~$(parse_git_branch)%# " | |
} | |
function proml { | |
local BLUE="\[\033[0;34m\]" |