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
import event as libevent; | |
alias LibeventContinuation= Lambda[[Int, Short, Pointer[libevent.Struct_event_base]], []]; | |
record LibeventContinuationBase | |
( |
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
puts params | |
params.require(:region).permit(:beacons) | |
---> output | |
{"region"=>{"beacons"=>[{"minor"=>123, "uuid"=>"123-123-123-123", "major"=>123}]}, "action"=>"create", "controller"=>"regions"} | |
Unpermitted parameters: beacons |
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
after_action :verify_authorized | |
# DELETE /applications/1 | |
# DELETE /applications/1.json | |
def destroy | |
@app.destroy | |
respond_to do |format| | |
format.html { redirect_to apps_url } |
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
aep@nightbringer: ~/proj/airbacon/airbeacon rails console | |
Loading development environment (Rails 4.0.2) | |
irb(main):001:0> User.create(app_id:123).token | |
(39.9ms) BEGIN | |
+++++++++++MAKING TOKEN! | |
SQL (125.5ms) INSERT INTO "users" ("app_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["app_id", 123], ["created_at", Tue, 25 Mar 2014 16:16:57 UTC +00:00], ["updated_at", Tue, 25 Mar 2014 16:16:57 UTC +00:00]] | |
(42.2ms) COMMIT | |
=> nil | |
irb(main):002:0> |
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 User < ActiveRecord::Base | |
belongs_to :app | |
before_create :make_token | |
protected | |
def make_token |
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
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.npPdTT | |
+ umask 022 | |
+ cd ./ | |
+ cd / | |
+ rm -rf ruby-2.0.0-p451 | |
+ /usr/bin/gzip -dc /tmp/rpmb/rpmbuild/SOURCES/ruby-2.0.0-p451.tar.gz | |
+ /bin/tar -xf - | |
+ STATUS=0 | |
+ '[' 0 -ne 0 ']' | |
+ cd ruby-2.0.0-p451 |
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
#2.2.2.2 PUBLIC SERVER IP | |
#1.1.1.1 PRIVATE SERVER IP | |
#192.168.1.130 CLIENT IP BEHIND NAT | |
# ipsec.conf - strongSwan IPsec configuration file | |
# basic configuration | |
config setup | |
# plutodebug=all |
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
# basic configuration | |
config setup | |
# nat_traversal=yes | |
# Connections into AWS VPC | |
conn %default | |
ikelifetime=60m | |
keylife=20m |
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
ActiveAdmin.register Foo | |
show do |b| | |
panel "Bar" do | |
table_for [0] do | |
column :api do | |
e+= (controller.render_to_string :partial => "status", :locals => {:status => | |
VpnConnection.is_ap_connected(b.endpoint, b) ? :up : :down }) | |
e+= b.name | |
e |
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
module Portal::V2 | |
class OnboardingController < PortalController | |
skip_filter :enforce_user_session!, only: [:index, :debug] | |
def index | |
# we never get here | |
end | |
end | |
end |
OlderNewer