This file contains hidden or 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 ruby | |
# Install some tools first | |
# brew install ffmpeg | |
# brew install lame | |
# brew install --HEAD watsonbox/cmu-sphinx/cmu-sphinxbase | |
# brew install --HEAD watsonbox/cmu-sphinx/cmu-pocketsphinx | |
# Place this file in the directory that you have files to convert. | |
# Make this file executable |
This file contains hidden or 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
# Install programs | |
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - | |
sudo apt-get install -y nodejs | |
sudo apt-get install -y python-virtualenv python-setuptools python-pip libxslt1-dev gcc | |
sudo apt-get install -y libffi-dev libjpeg-dev libxml2-dev libxslt-dev libyaml-dev python-dev | |
sudo apt-get install -y python-setuptools python-dev libxslt1-dev gcc libffi-dev libjpeg-dev | |
sudo apt-get install -y libxml2-dev libxslt-dev libyaml-dev libpq-dev postgresql | |
sudo apt-get install -y postgresql-server-dev-9.5 supervisor redis-server nginx htop | |
# Create a user to run Sentry |
This file contains hidden or 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 PropertiesController < ApplicationController | |
include ActionController::Live | |
before_action :find_county | |
def index | |
response.headers["Content-Type"] ||= 'text/csv' | |
response.headers["Content-Disposition"] = "attachment; filename=#{@county.csv_file_name}" | |
response.stream.write Property::CSV_HEADERS.to_csv |
This file contains hidden or 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 ruby | |
if ARGV.size != 2 | |
puts "Usage: #{$0} <from_language> <to_language>" | |
exit -1 | |
end | |
require 'rubygems' | |
require 'ya2yaml' # this gem is needed for this to work! | |
require 'yaml' |
This file contains hidden or 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/ruby | |
# Servo Rotation | |
# Wiring: | |
# From +5V (PIN2) to Positive on Servo (Red) | |
# From Ground (PIN6) to Ground on Servo (Brown) | |
# From GPIO18 to 1kOhm Resistor to Signal on Servo (Orange) | |
# Requires Ruby (`sudo apt-get install ruby ruby1.9.1-dev`) |
This file contains hidden or 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
ElasticSearch for realtime searching. Make sure that it is installed as | |
described below. | |
sudo add-apt-repository ppa:webupd8team/java | |
sudo apt-get update | |
sudo apt-get install oracle-java7-installer | |
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.3.2.deb | |
mv elasticsearch-1.3.2.deb ~ | |
sudo dpkg -i ~/elasticsearch-1.3.2.deb | |
sudo nano /etc/elasticsearch/elasticsearch.yml |
NewerOlder