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
# 1) Create your private key | |
$ cd ~/.ssh | |
$ openssl genrsa -des3 -passout pass:x -out lvh.me.pass.key 2048 | |
# 2) Generate RSA key | |
$ openssl rsa -passin pass:x -in lvh.me.pass.key -out lvh.me.key | |
# 3) Get rid of private key | |
$ rm lvh.me.pass.key |
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
require 'arel/nodes/binary' | |
module Arel | |
module Nodes | |
class ContainedInHStore < Arel::Nodes::Binary | |
def operator; :"<@" end | |
end | |
class ContainedInArray < Arel::Nodes::Binary | |
def operator; :"<@" end |
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
# General Reading: https://developer.rackspace.com/docs/cloud-files/v1/developer-guide/#document-public-access-to-your-cloud-files-account/tempurl | |
$ curl -v -H "X-Auth-User: <your_rackspace_username>" -H "X-Auth-Key: <your_rackspace_api_key>" https://auth.api.rackspacecloud.com/v1.0 | |
* About to connect() to auth.api.rackspacecloud.com port 443 (#0) | |
* Trying 67.192.1.11... connected | |
* Connected to auth.api.rackspacecloud.com (67.192.1.11) port 443 (#0) | |
* SSLv3, TLS handshake, Client hello (1): | |
* SSLv3, TLS handshake, Server hello (2): | |
* SSLv3, TLS handshake, CERT (11): | |
* SSLv3, TLS handshake, Server finished (14): |
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
wget -P /path/to/destination/directory/ -mpck --user-agent="" -e robots=off --wait 1 -E https://www.example.com/ |
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
@pngs = {} | |
timestamp = Time.now.to_i | |
Dir.mkdir("#{Rails.root}/tmp/rmagick") unless File.exists?("#{Rails.root}/tmp/rmagick") | |
Dir.mkdir("#{Rails.root}/tmp/rmagick/reports") unless File.exists?("#{Rails.root}/tmp/rmagick/reports") | |
Dir.mkdir("#{Rails.root}/tmp/rmagick/reports/#{timestamp}") unless File.exists?("#{Rails.root}/tmp/rmagick/reports/#{timestamp}") | |
params[:svgs].each do |key,svg| | |
string = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>'+URI.unescape(svg) | |
string.gsub!("'lucida grande', 'lucida sans unicode', verdana, arial, helvetica, sans-serif",'') # classes_observed_by_grade_level | |
string.gsub!(/clip-path="url\(#highcharts-[0-9]*\)"/,'clip-path="none"') # classes_observed_by_grade_level | |
string.gsub!(' opacity="1"','') # classes_observed_by_grade_level |
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
/* | |
Throwing Object.keys error in IE8 fix: | |
http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation | |
*/ | |
Object.keys = Object.keys || (function () { | |
var hasOwnProperty = Object.prototype.hasOwnProperty, | |
hasDontEnumBug = !{toString:null}.propertyIsEnumerable("toString"), | |
DontEnums = [ | |
'toString', | |
'toLocaleString', |
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
# config/initializers/mime_types.rb | |
Mime::Type.register "application/vnd.ms-excel", :xls |
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
$ HOMEBREW_MAKE_JOBS=1 VERBOSE=1 brew install sphinx --pgsql | |
Warning: Using Clang, but this formula is reported to fail with Clang. | |
sphinxexpr.cpp:1802:11: error: use of undeclared identifier 'ExprEval' | |
We are continuing anyway so if the build succeeds, please open a ticket with | |
the subject | |
sphinx-2.0.6: builds with Clang-425-10.7 |
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
$ HOMEBREW_MAKE_JOBS=1 VERBOSE=1 brew install sphinx | |
Warning: Using Clang, but this formula is reported to fail with Clang. | |
sphinxexpr.cpp:1802:11: error: use of undeclared identifier 'ExprEval' | |
We are continuing anyway so if the build succeeds, please open a ticket with | |
the subject | |
sphinx-2.0.6: builds with Clang-425-10.7 |
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
$ HOMEBREW_MAKE_JOBS=1 VERBOSE=1 brew install sphinx | |
==> Downloading http://sphinxsearch.com/files/sphinx-2.0.6-release.tar.gz | |
Already downloaded: /Library/Caches/Homebrew/sphinx-2.0.6.tar.gz | |
/usr/bin/tar xf /Library/Caches/Homebrew/sphinx-2.0.6.tar.gz | |
==> Downloading http://snowball.tartarus.org/dist/libstemmer_c.tgz | |
Already downloaded: /Library/Caches/Homebrew/libstemmer_c.tgz | |
/usr/bin/tar xf /Library/Caches/Homebrew/libstemmer_c.tgz | |
==> ./configure --prefix=/usr/local/Cellar/sphinx/2.0.6 --disable-dependency-tracking --localstatedir=/usr/local/var --with-libstemmer --without-mysql | |
./configure --prefix=/usr/local/Cellar/sphinx/2.0.6 --disable-dependency-tracking --localstatedir=/usr/local/var --with-libstemmer --without-mysql |