Skip to content

Instantly share code, notes, and snippets.

server {
listen 8080;
resolver 8.8.8.8;
# Proxy paths that do not contain a dot to /members/$1
location ~* ^/([^.]*)$ {
proxy_pass https://generos.app/members/$1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
@philetos
philetos / gist:e3dde4567009f47264369060c6a79d6a
Last active August 16, 2021 15:33
Pat's Top Dallas Eating Spots
# http://docs.amazonwebservices.com/elasticbeanstalk/latest/dg/create_deploy_Ruby_sinatra.html
wget https://s3.amazonaws.com/elasticbeanstalk/cli/AWS-ElasticBeanstalk-CLI-2.2.zip
unzip AWS-ElasticBeanstalk-CLI-2.2.zip
mkdir eb_ruby
cd eb_ruby
echo "require './helloworld'
run Sinatra::Application" > config.ru
@philetos
philetos / gist:05003a0887ce3946efc2
Created September 8, 2014 18:38
Renv Ruby Build Fail Fix
RUBY_CONFIGURE_OPTS="--with-openssl-dir=`brew --prefix openssl` --with-readline-dir=`brew --prefix readline`" rbenv install 2.1.2
@philetos
philetos / gist:8225c7d899a545fdd89d
Last active August 29, 2015 14:06
transfer file
{
"color_scheme": "Packages/User/Railscasts.tmTheme",
"font_size": 12.0,
"ignored_packages":
[
"Vintage"
],
"tab_size": 2,
"theme": "Soda Dark.sublime-theme",
"translate_tabs_to_spaces": true
@philetos
philetos / gist:d4fac90e820055583ca1
Last active August 29, 2015 14:04
Promo Redemptions API

Promo Redemptions API

This api allows clients to access the promo redemption process.

Note: this api requires authentication.

Endpoints

#Using Font-Awesome with Rails 3.1 using CSS

  1. Download font-awesome from https://github.com/FortAwesome/Font-Awesome

  2. Put the font folder in the app/assets. I renamed the folder from font to fonts to make it clearer

  3. Add config.assets.paths << "#{Rails.root}/app/assets/fonts" to config/application.rb. This is to include the apps/assets/fonts folder in the asset pipeline

  4. Put the font-awesome.css file in the app/assets/stylesheets folder

#!/usr/bin/env bash
uninstall() {
list=`gem list --no-versions`
for gem in $list; do
gem uninstall $gem -aIx
done
gem list
gem install bundler
}
@philetos
philetos / Array Counting
Created February 7, 2014 19:25
Array Counting
animals = ["tiger",
"tiger",
"lion",
"dog",
"cat",
"mouse",
"bear",
"frog",
"tiger",
"lion",
@philetos
philetos / 0_reuse_code.js
Created January 20, 2014 22:53
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console