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
Building native extensions. This could take a while... | |
Building nokogiri using packaged libraries. | |
Building libxml2-2.8.0 for nokogiri with the following patches applied: | |
- 0001-Fix-parser-local-buffers-size-problems.patch | |
- 0002-Fix-entities-local-buffers-size-problems.patch | |
- 0003-Fix-an-error-in-previous-commit.patch | |
- 0004-Fix-potential-out-of-bound-access.patch | |
- 0005-Detect-excessive-entities-expansion-upon-replacement.patch | |
- 0006-Do-not-fetch-external-parsed-entities.patch | |
- 0007-Enforce-XML_PARSER_EOF-state-handling-through-the-pa.patch |
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(){ | |
$('#masonry-container').masonry({ | |
itemSelector: '.box', | |
columnWidth: 200, | |
isAnimated: !Modernizr.csstransitions, | |
isFitWidth: true | |
}); | |
}); |
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
total_records = 135 | |
offset = 0 | |
item_per_page | |
page = 2 | |
offset = (page - 1) * item_per_page | |
while offset < total_records do | |
# do something |
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
In the file | |
https://github.com/bayyar/wikiful/blob/master/app/views/categories/show.html.erb#L8-L14 | |
Change it to this: | |
<% @category.articles.each do |article| %> | |
<tr> | |
<td><%= link_to article.title.truncate(25), article %></td> | |
<td><%= article.created_at.strftime('%b %d, %Y') %></td> | |
<td><%= truncate(article.content, length:100) %></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
Alfred | |
oh-my-zsh | |
Bartender | |
Sizeup | |
iTerm2 | |
VLC | |
The Unarchiver | |
Skitch | |
F.lux | |
HyperDock |
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
# ZSH Theme - Preview: http://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png | |
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" | |
# COLOR SETTINGS | |
BIRA_BRACKET_COLOR="%{$fg[white]%}" | |
BIRA_TIME_COLOR="%{$fg[yellow]%}" | |
BIRA_RVM_COLOR="%{$fg[magenta]%}" | |
BIRA_DIR_COLOR="%{$fg[cyan]%}" | |
BIRA_GIT_BRANCH_COLOR="%{$fg[green]%}" |
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 Node | |
attr_accessor :node, :next | |
def self.last(node) | |
return node if node.next.nil? | |
node = last node.next | |
end | |
def self.reverse(node) | |
return node if node.next.nil? |
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
sudo su postgres -c 'createuser -P --superuser madelek13' |
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 'open-uri' | |
require 'JSON' | |
url = "http://www.letsrevolutionizetesting.com/challenge" | |
i_am_the_winner = false | |
until i_am_the_winner do | |
json = JSON.parse(open(url, "Accept" => "application/json").read) | |
if json.has_key?("follow") | |
url = json["follow"] |
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
namespace :docs do | |
namespace :apiary do | |
task :build do | |
File.delete("#{Rails.root}/docs/apiary/blueprint.apib") if File.exist?("#{Rails.root}/docs/apiary/blueprint.apib") | |
header = File.open("#{Rails.root}/docs/apiary/header.apib") | |
File.open("#{Rails.root}/docs/apiary/blueprint.apib", 'a') do |file| | |
file.write(header.read) | |
header.close |
NewerOlder