View install.sh
#!/usr/bin/env bash
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# http://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# http://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# http://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# http://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Versions
CHROME_DRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`
View install_wifi_access_point.sh
#!/bin/bash
### Setup a wifi Access Point on Ubuntu 12.04 (or its derivatives).
### make sure that this script is executed from root
if [ $(whoami) != 'root' ]
then
echo "
This script should be executed as root or with sudo:
sudo $0
"
View edit-commit-author.sh
git filter-branch --commit-filter '
if [ "$GIT_COMMITTER_NAME" = "<Old Name>" ];
then
GIT_COMMITTER_NAME="<New Name>";
GIT_AUTHOR_NAME="<New Name>";
GIT_COMMITTER_EMAIL="<New Email>";
GIT_AUTHOR_EMAIL="<New Email>";
git commit-tree "$@";
else
git commit-tree "$@";
View base_controller.rb
# Location: app/controllers/api/base_controller.rb
class Api::BaseController < ApplicationController
rescue_from ::Exception, :with => :rescue_exception
rescue_from ActiveRecord::RecordNotFound, :with => :record_not_found
rescue_from ActionController::RoutingError, :with => :routing_error
def undefined_route
routing_error
end
View app_config.rb
# Location: config/initializers/app_config.rb
APP_CONFIG = YAML.load_file(File.join(Rails.root, 'config', 'config.yml'))[Rails.env]
View Capfile
# Location: /Capfile
load 'deploy'
# Uncomment if you are using Rails' asset pipeline
load 'deploy/assets'
load 'config/deploy' # remove this line to skip loading any of the default tasks
View items-sitemap.xml.builder
# Below is a snippet to generate sitemap.xml file
# Reference: http://www.sitemaps.org, http://en.wikipedia.org/wiki/Site_map, http://support.google.com/webmasters/bin/answer.py?hl=en&answer=183668&topic=8476&ctx=topic
xml.instruct!
xml.urlset(:xmlns => "http://www.sitemaps.org/schemas/sitemap/0.9") {
@items.each do |item|
xml.url {
xml.loc(item_url(item))
View locations-lat-long-radius-and-distance.txt
Table schema for locations:
===========================
create_table "locations", :force => true do |t|
t.string "zipcode", :limit => 6
t.string "city", :limit => 25
t.string "state_code", :limit => 3
t.string "state_name", :limit => 25
t.float "latitude"
t.float "longitude"