View 01. Gemfile
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
gem 'pg' | |
group :development do | |
gem 'ruby-debug' | |
end | |
gem 'rake', '~> 0.8.7' | |
gem 'devise' | |
gem 'oa-oauth', :require => 'omniauth/oauth' | |
gem 'omniauth' | |
gem 'haml' | |
gem 'dynamic_form' |
View es.sh
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
cd ~ | |
sudo yum update | |
sudo yum install java-1.7.0-openjdk.i686 -y | |
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.9.tar.gz -O elasticsearch.tar.gz | |
tar -xf elasticsearch.tar.gz | |
rm elasticsearch.tar.gz | |
mv elasticsearch-* elasticsearch | |
sudo mv elasticsearch /usr/local/share |
View gist:68640a4b20dd6c1d6605143f063931c3
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
https://chartio.com/resources/tutorials/how-to-set-the-default-user-password-in-postgresql |
View capybara cheat sheet
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
=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') |
View word_extract_pages
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
' Macro to Extract pages | |
Sub mcrExtractPages() | |
Application.Browser.Target = wdBrowsePage | |
For i = 1 To ActiveDocument.BuiltInDocumentProperties("Number of Pages") | |
ActiveDocument.Bookmarks("\page").Range.Copy | |
Documents.Add | |
Selection.Paste | |
ChangeFileOpenDirectory "C:\Temp" | |
DocNum = DocNum + 1 | |
ActiveDocument.SaveAs FileName:="ExtractedPage_" & DocNum & ".docx" |
View gist:20e0a4aa731d797373e2
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
http://codepen.io/JacobStone420/pen/GfLEn | |
http://tympanus.net/codrops/2011/11/02/original-hover-effects-with-css3/ | |
http://www.designshifts.com/add-an-off-canvas-sidebar-menu-to-a-wordpress-theme/ | |
View modules-example.rb
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
module FormatAttributes | |
def formats(*attributes) | |
@format_attributes = attributes | |
end | |
def format_attributes | |
@format_attributes | |
end | |
end |
View person.rb
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 Person | |
attr_reader :name | |
def initialize(name) | |
@name = name | |
end | |
def introduce | |
"hello, my name is #{@name}" | |
end |
View fedora-install-nodejs.sh
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 | |
func_check_for_root() { | |
if [ ! $( id -u ) -eq 0 ]; then | |
echo "ERROR: $0 Must be run as root, Script terminating" ;exit 7 | |
fi | |
} | |
func_check_for_root | |
#SETUP PARAMS |
View centos_install_mysql
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 yum -y update | |
$ sudo yum -y install mysql-server mysql-devel | |
$ sudo /etc/init.d/mysqld start | |
$ sudo /usr/bin/mysql_secure_installation | |
# To auto-start on boot: | |
sudo /sbin/chkconfig --level 2345 mysqld on | |
# Check if the above worked by executing the following command: | |
/sbin/chkconfig --list | grep mysqld |
NewerOlder