Skip to content

Instantly share code, notes, and snippets.

View terrcin's full-sized avatar

terrcin terrcin

View GitHub Profile
@terrcin
terrcin / gist:0745f2c6240aad291077
Last active August 29, 2015 14:17
Granting readonly access to rails production console by default
# In our config/deploy.rb we have the below for an easy prod console.
# There are various ways of doing it.
desc "Remote console"
task :console, roles: :app do
server = find_servers(roles: [:app]).first
run_with_tty server, %W( ./script/rails console #{rails_env} )
end
# Turns out there is a '--sandbox' option for the console that will roll back any changes on exit
@terrcin
terrcin / gist:dee008b594bda7c3703d
Created March 17, 2016 20:15
NZ Rails Camp 2016 Travel Information
** Friday Bus Pickup **
All buses will be leaving at their scheduled time fromPlatform 9 at the Wellington train station (http://goo.gl/maps/MKjjW) note that’s not the Bus Terminal but the Train Station. Please don’t be late, and please don’t turn up to a different time than what you selected as space is limited and it always causes us organisers headaches waiting for people who are already at camp. If for what ever reason you decide to not take the bus you have booked you need to let us know.
If you’re arriving from out of town there is a service from the airport called the Airport Flier, it will take you straight to the train station: https://www.wellingtonairport.co.nz/parking-and-transport/airport-flyer-bus/
** Driving there yourself **
You’re more than welcome to drive yourself there, please don’t turn up before 3:30pm. http://camp.ruby.nz has a link to where the camp is. Please make sure you tell us that you don’t need a seat on a bus.
> gem list
*** LOCAL GEMS ***
bigdecimal (1.2.8)
bundler (1.13.6)
bundler-unload (1.0.2)
did_you_mean (1.0.0)
executable-hooks (1.3.2)
gem-wrappers (1.2.7)
@terrcin
terrcin / appsignal_telemetry.ex
Last active April 4, 2022 11:03 — forked from cblavier/appsignal_telemetry.ex
A Phoenix Telemetry agent to monitor all LiveView events & errors
# Add after ExampleWeb.Telemetry to the list of children to be supervised in Application.start
defmodule ExampleWeb.AppsignalTelemetry do
use GenServer
require Appsignal.Utils
import Appsignal.Utils, only: [module_name: 1]
@tracer Appsignal.Utils.compile_env(:appsignal, :appsignal_tracer, Appsignal.Tracer)
@span Appsignal.Utils.compile_env(:appsignal, :appsignal_span, Appsignal.Span)
@appsignal_namespace "live_view"