Skip to content

Instantly share code, notes, and snippets.

View idyll's full-sized avatar
👾
pushing bits.

Mark Madsen idyll

👾
pushing bits.
View GitHub Profile
@idyll
idyll / rules.txt
Created January 10, 2022 21:15 — forked from AndrewDryga/rules.txt
Grok parser for Elixir logs
## You can use this set or rules to parse Elixir logs in DataDog Logger
# 16:01:37.511 request_id=2khj5fsrc3lpk86dh8000g5h [debug] Processing with TwilioProxy.RequestController.create
router %{date("HH:mm:ss.SSS"):date} (%{data::keyvalue("=", " ")} )?\[+%{word:level}\] Processing (with|by) +%{data:controller.callback}
# 16:04:07.995 request_id=u8m11nptsmsjc282k3l1133u6evmljer [info] Sent 200 in 16ms
# 16:04:07.995 request_id=u8m11nptsmsjc282k3l1133u6evmljer [info] Sent 200 in 16µs
# 00:05:30.048 request_id=sXax4ynq8i+zU90Emg84 [info] Sent 400 in 1ms
@idyll
idyll / Dockerfile
Created September 2, 2016 15:09 — forked from bitwalker/Dockerfile
Release container image
FROM bitwalker/alpine-erlang:latest
MAINTAINER Paul Schoenfelder <paulschoenfelder@gmail.com>
ENV REFRESHED_AT=2016-06-21 \
HOME=/opt/app/ \
MIX_ENV=prod \
TERM=xterm \
APP=myapp \
APPVER=0.1.0
require 'pdf-reader'
#doc = PDF::Reader.new(File.expand_path('~/Desktop/note-example.pdf'))
doc = PDF::Reader.new(File.expand_path('./book-mw-read-thru.pdf'))
$objects = doc.objects
def is_note?(object)
object[:Type] == :Annot && object[:Subtype] == :Text
end
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain user;killall Finder;echo "Open With has been rebuilt, Finder will relaunch"
@idyll
idyll / redis.yml
Created January 13, 2014 04:55 — forked from xxx/redis.yml
defaults:
:port: 6379
:host: localhost
development:
:db: 2
:namespace: development
# force use of Redis::Distributed
:host:
- localhost
/****** Current Format ******/
// Basic Message
metadata = {
id: 1234234234, // Randomly generated by the client. Used for receiving success/fail callbacks
client_id: 123456 // Sent from the server with the `websocket_rails.client_connected` event which is sent after the connection is opened. Store this and send it with each message.
data: {name: 'shoes'} // Arbitrary data. Can be Object or String. This is available through #message or #data in the controller.
}
event = ["products.new", metadata]
@idyll
idyll / README.md
Created June 20, 2013 20:40 — forked from croaky/README.md

Rails app

is a Rails 3.1 app running on Ruby 1.9.2 and deployed to Heroku's Cedar stack. It has an RSpec and Cucumber test suite which should be run before commiting to the master branch.

Running tests

Create aliases:

## The quick-and-nasty CVE-2013-0156 Heroku inspector!
## Originally brought to you by @elliottkember with changes by @markpundsack @ Heroku
## Download and run using:
## ruby heroku-CVE-2013-0156.rb
`heroku list`.split("\n").each do |app|
app = app.strip
# Some "heroku apps" lines have === formatting for grouping. They're not apps.
next if app[0..2] == "==="