Skip to content

Instantly share code, notes, and snippets.

@czivko
czivko / application_controller.rb
Created January 8, 2019 21:56
Simple Auth Token security for RoR API Endpoint
class Api::V1::ApplicationController < ActionController::API
include ActionView::Rendering
include ActionController::HttpAuthentication::Token::ControllerMethods
before_action :restrict_access
before_action :allow_cross_domain_access
respond_to :json
def options
render plain: { ok: :ok }.to_json, status: :ok, content_type: 'application/json'
end
@czivko
czivko / gist:25a603358e1d42badca203208c7a2a41
Last active July 24, 2017 22:05
Synapse Test User Docs
{
"documents":[
{
"email":"testerasdfasfd@test.com",
"phone_number":"901-942-8167",
"ip":"1.1.1.1",
"name":"Charlie Brown2",
"alias":"Snoopy",
"entity_type":"M",
"entity_scope":"Arts \u0026 Entertainment",
runtime.MHeap_Alloc(0x9922c0, 0x1, 0x1000000002b, 0x59c09)
aes/src/ngrok/toolchain/src/runtime/mheap.c:240 +0x66
runtime.MCentral_CacheSpan(0x99bc58, 0xc208522e58)
/Users/aes/src/ngrok/toolchain/src/runtime/mcentral.c:85 +0x167
runtime.MCache_Refill(0xa83e10, 0x2b, 0xaa0cd8)
/Users/aes/src/ngrok/toolchain/src/runtime/mcache.c:90 +0xa0
goroutine 14 [running]:
runtime.switchtoM()
/Users/aes/src/ngrok/toolchain/src/runtime/asm_amd64.s:198 fp=0xc208522d28 sp=0xc208522d20
Foundfailed MSpanList_Insert 0xab4190 0x8d9e1bfb2d3 0x0
fatal error: MSpanList_Insert
runtime stack:
runtime.MSpanList_Insert(0x992a18, 0xab4190)
/Users/aes/src/ngrok/toolchain/src/runtime/mheap.c:692 +0x8f
runtime.MHeap_Alloc(0x9922c0, 0x2, 0x10000000026, 0x59c09)
/Users/aes/src/ngrok/toolchain/src/runtime/mheap.c:240 +0x66
runtime.MCentral_CacheSpan(0x99b6b8, 0xc2081d3090)
/Users/aes/src/ngrok/toolchain/src/runtime/mcentral.c:85 +0x167
@czivko
czivko / builds.md
Last active December 17, 2015 22:29 — forked from atmos/builds.md
@czivko
czivko / vendor-ffmpeg-x264-mp3lame-heroku
Last active January 23, 2023 12:23 — forked from coopermaruyama/vendor-ffmpeg-heroku
How to compile ffmpeg with h264 and mp3 encoders enabled for use on heroku.
## Get FFMpeg working on heroku by building binaries using vulcan
# also added instructions on how to compile with libmp3lame and libx264
gem install vulcan
vulcan create foo
#clone the app vulcan just created
git clone git@heroku.com:foo
@czivko
czivko / params output
Created November 23, 2011 01:31
event packages
{
"utf8" =>"✓",
"authenticity_token" =>"L8ezPjizbUKbcgi6qHrYrXntBfTPPz1a8QSKqk+lvSk=",
"event" => {
"name" =>"one",
"start_time" =>"",
"end_time" =>"",
"venue_name" =>"",
"address" =>"",
"city" =>"",