Skip to content

Instantly share code, notes, and snippets.

View AnwarShah's full-sized avatar

Anwar AnwarShah

View GitHub Profile
@AnwarShah
AnwarShah / railscasts.rb
Last active August 29, 2015 14:27 — forked from samqiu/railscasts.rb
Download free Railscast video
View railscasts.rb
#!/usr/bin/ruby
require 'rss'
# Usage
# $ ./railscasts.rb http://railscasts.com/subscriptions/YOURRAILSCASTRSS/\/
# episodes.rss
# OR
# $ ./railscasts.rb
p 'Downloading rss index'
@AnwarShah
AnwarShah / zsh.md
Last active August 29, 2015 14:27 — forked from tsabat/zsh.md
Getting oh-my-zsh to work in Ubuntu
View zsh.md
@AnwarShah
AnwarShah / application.css.scss
Created November 1, 2015 15:40 — forked from victorbstan/application.css.scss
Overriding will_paginate gem to provide a drop-down select html tag list for all the page.
View application.css.scss
.pagination {
display:inline-block;
form {
display: inline-block;
margin:0;
select {
width:100px;
}
}
}
@AnwarShah
AnwarShah / jdk_install_script.sh
Created December 16, 2015 12:18
Installation script for oracle jdk
View jdk_install_script.sh
#!/bin/bash
if [ $# -ne 1 ]
then
echo Usage: `basename $0` PATH_TO_DOWNLOADED_TGZ
echo Example: `basename $0` ~/Downloads/jdk-7u4-linux-x64.tar.gz
exit 127
fi
if [[ $USER != "root" ]]
then
@AnwarShah
AnwarShah / config.rb
Created January 11, 2016 15:44
Rubinius failing config.rb
View config.rb
module Rubinius
config = {}
config[:config_file] = "/home/anwar/Downloads/rubinius-3.4/config.rb"
config[:command_line] = []
config[:build_make] = "make"
config[:build_rake] = "rake"
config[:build_perl] = "perl"
config[:llvm_enabled] = true
config[:llvm_path] = nil
config[:llvm_system_name] = nil
@AnwarShah
AnwarShah / exception_in_rubinius_install
Created January 13, 2016 13:57
Exception detail in rubinius install by running `bin/mspec ci spec/ruby/optional/capi/bignum`
View exception_in_rubinius_install
rubinius 3.4 (2.2.0 2016-01- 2016-01-10 3.4 JI) [i686-linux-gnu]
...................[BUG: Uncaught C++ exception]
Please report this with the following backtrace to https://github.com/rubinius/rubinius/issues
The Rubinius process is aborting
bin/rbx(_ZN8rubinius5abortEv+0x2b) [0x81f0f7b]
bin/rbx() [0x81e8ea2]
/usr/lib/i386-linux-gnu/libstdc++.so.6(+0x4a1f3) [0xb757d1f3]
/usr/lib/i386-linux-gnu/libstdc++.so.6(+0x4a22f) [0xb757d22f]
/usr/lib/i386-linux-gnu/libstdc++.so.6(+0x4a496) [0xb757d496]
bin/rbx(_ZN8rubinius13RubyException5raiseEPNS_9ExceptionEb+0x55) [0x81f0c95]
View after_trying_first_fix
Running 655 tests...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................OK!
bin/mspec ci :ci_files -t bin/rbx -d --background
rubinius 3.4 (2.2.0 2016-01- 2016-01-17 3.4 JI) [i686-linux-gnu]
........................................................................................................................................................................................................................................
@AnwarShah
AnwarShah / 3rd_failing_output_in_rubinius.txt
Created January 17, 2016 11:20
Failed attempt after trying the first patch with cloning
View 3rd_failing_output_in_rubinius.txt
Running 655 tests...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................OK!
bin/mspec ci :ci_files -t bin/rbx -d --background
rubinius X.Y.Z (2.2.0 2016-01- 2016-01-17 3.4 JI) [i686-linux-gnu]
....................................................................................................................................................................................................................................
@AnwarShah
AnwarShah / capybara cheat sheet
Created January 18, 2016 06:29 — forked from zhengjia/capybara cheat sheet
capybara cheat sheet
View capybara cheat sheet
=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')
@AnwarShah
AnwarShah / generate_manifest_file.sh
Created January 30, 2016 10:03
Generate package list and version like in Ubuntu manifest
View generate_manifest_file.sh
# Generate binary package list and there version in
# line like ubuntu manifest file
dpkg-query -W -f='${binary:Package}\t${Version}\n'