Skip to content

Instantly share code, notes, and snippets.

View snatchev's full-sized avatar
🎏
worse is better

Stefan Natchev snatchev

🎏
worse is better
View GitHub Profile
@snatchev
snatchev / png.rb
Created January 12, 2018 18:58
a simple single-class PNG decoder in raw ruby with no external dependencies.
require 'zlib'
##
# This is a simple PNG decoder, inspired and adapted from ChunkyPNG
class PNG
SIGNATURE = [137, 80, 78, 71, 13, 10, 26, 10].pack('C8').force_encoding('BINARY')
attr_reader :width, :height, :depth, :color, :compression, :filtering, :interlace
##
diff --git a/app/features-json/middleware/jwt_auth.rb b/app/features-json/middleware/jwt_auth.rb
index e6c1f15..9d0e1a1 100644
--- a/app/features-json/middleware/jwt_auth.rb
+++ b/app/features-json/middleware/jwt_auth.rb
@@ -5,14 +5,19 @@ require "jwt"
module FastlaneCI
# API Middleware responsible of authenticate all the requests that uses it.
class JwtAuth
- def initialize(app)
+ def initialize(app, encryption_key=nil)
@snatchev
snatchev / .tmux.conf
Created July 16, 2020 14:11
Simple practical tmux conf
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %