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
describe "POST create" do | |
describe "with valid params" do | |
it "creates a new ProjectStage" do | |
expect { | |
post :create, {:project_stage => valid_attributes}, valid_session | |
}.to change(ProjectStage, :count).by(1) | |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Boris Expander Example</title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function() { |
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> | |
<meta charset="utf-8" /> | |
<title>Boris Expander Example</title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function() { | |
$('a.vertical-expander').click(function(e) { |
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
#!/bin/bash | |
function run_git { | |
echo ================================= | |
cmd="git $1" | |
echo "$cmd" | |
echo $cmd | bash | |
git ra | |
echo ================================= | |
} |
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
#====================================== | |
# BEFORE: | |
#====================================== | |
class FetchApartments | |
def fetch_query_page(query) | |
stream = download(query.to_url, "http://www.yad2.co.il/Nadlan/rent.php") | |
doc = Nokogiri::HTML(stream) | |
total_text = doc.css('li.ads').first.text | |
@total = /\d+/.match(total_text)[0].to_i |
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
Section "Screen" | |
Identifier "Default Screen" | |
Monitor "MyScreen" | |
SubSection "Display" | |
Virtual 3600 1080 | |
EndSubSection | |
EndSection |
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
func! WebSearch(url) | |
let searchterm = input('Search: ') | |
if searchterm != '' | |
let url = substitute(a:url, "%query%", searchterm, '') | |
call Browse(url) | |
end | |
endfunc | |
func! Browse(url) | |
if has('gui_win32') |
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
imap <f2> <c-o>:call ToggleHebrew()<cr> | |
map <f2> :call ToggleHebrew()<cr> | |
func! ToggleHebrew() | |
if &rl | |
set norl | |
set keymap= | |
else | |
set rl | |
set keymap=hebrew |
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 ArticleController | |
def comments | |
comments = Comment.includes(:user).find_all_by_article_id(params[:id]) | |
render json: comments, root: false | |
end | |
end | |
class CommentSerializer < ActiveModel::Serializer | |
attributes :id, :created_at, :body, :subject |
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
#!/usr/bin/env bash | |
function convert_file { | |
infile=$1 | |
outfile=`echo $infile | sed 's/\.md$/\.html/'` | |
echo "Converting $infile to $outfile... " | |
cat > $outfile <<EOF | |
<!DOCTYPE html> | |
<html> | |
<head> |
OlderNewer