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 March 15, 2017 15:09
Elixir Dockerfile
FROM trenpixster/elixir:1.4.1
MAINTAINER Mark Madsen <mm@idyll.io>
RUN curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
RUN apt-get update
RUN apt-get install -y libssl1.0.0 openssl apt libgcrypt11 libxml2 openssh-client libc6 gnupg dpkg openssh-sftp-server apt-utils apt-transport-https libpcre3 curl gcc-4.9-base gpgv libapt-inst1.5 libapt-pkg4.12 libc-bin libcurl3 libcurl3-gnutls libexpat1 libgcc1 libk5crypto3 libpng12-0 tzdata multiarch-support
RUN apt-get update --fix-missing
RUN apt-get install -y build-essential nodejs imagemagick
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
@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 / keybase.md
Created March 5, 2014 19:51
keybase.md

Keybase proof

I hereby claim:

  • I am idyll on github.
  • I am idyll (https://keybase.io/idyll) on keybase.
  • I have a public key whose fingerprint is F6D8 809F 9C8F 7E84 8398 B5AF AA67 6081 D2BC AB72

To claim this, I am signing this object:

@idyll
idyll / gist:8619117
Created January 25, 2014 16:38
Cloud 66 NGINX config changes to support redirects.
- listen 80 default_server;
- server_name _;
+ listen 80;
+ server_name {{ ssl_certificate_servernames }};
@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: