Skip to content

Instantly share code, notes, and snippets.

View karmatr0n's full-sized avatar

Alejandro Juárez karmatr0n

View GitHub Profile
@karmatr0n
karmatr0n / bridge.sh
Created August 19, 2014 16:34
Enable Internet access in your WiFi Pineapple through a network bridge and NAT with pf in Mac OS
#!/bin/sh
# You must execute this script with sudo: sudo sh bridge.sh
# Setting the ip address for en0 (ethernet interface) to enable access for pineapple default address: 172.16.42.1
ifconfig en0 172.16.42.2 netmask 255.255.255.0 broadcast 172.16.42.255 up
# Setting the bridge
ifconfig bridge0 create
ifconfig bridge0 up
ifconfig bridge0 addm en0
# Ejemplo de deployment con inploy para rails3
deploy.application = "yourproject"
deploy.repository = '[email protected]:alecz/yourdeposit.git'
deploy.hosts = ['143.135.4.140']
# OPTIONALS
before_restarting_server do
rake "install:gems"
run "bundle install"
#
# Example of config.ru for Application based on Sinatra + WeBrick + SSL
#
require File.dirname(__FILE__) + '/environment'
require File.dirname(__FILE__) + '/your_sinatra_app'
require 'webrick'
require 'webrick/https'
certificate = "/your/path/certs/myssl.crt"
private_key = "/your/path/certs/myssl.key"
# Edit this Gemfile to bundle your application's dependencies.
source :gemcutter
gem "rails", "3.0.0.beta"
gem "pg"
gem "haml-edge", "2.3.155", :require => 'haml'
gem "compass", "0.10.0.pre8", :git => "git://github.com/chriseppstein/compass.git", :branch => 'master'
gem "authlogic", "2.1.3", :git => "git://github.com/binarylogic/authlogic.git", :branch => 'master'
gem "ssl_requirement"
class SessionsController < ApplicationController
include SslRequirement
ssl_required :create, :new, :recover_password if Rails.env == "production"
skip_before_filter :require_login, :only => [:new, :create]
layout 'session'
respond_to :html
def new
respond_with(@session = UserSession.new)