Skip to content

Instantly share code, notes, and snippets.

View deric's full-sized avatar

Tomas Barton deric

  • Prague, Czech Republic
View GitHub Profile
@thomasdarimont
thomasdarimont / readme.md
Last active March 15, 2024 08:56
Example for decoding a JWT Payload with your Shell (bash, zsh...)

Setup

Add this to your .profile, .bashrc, .zshrc...

decode_base64_url() {
  local len=$((${#1} % 4))
  local result="$1"
  if [ $len -eq 2 ]; then result="$1"'=='
  elif [ $len -eq 3 ]; then result="$1"'=' 
  fi
 echo "$result" | tr '_-' '/+' | openssl enc -d -base64
@mlepage
mlepage / Default.sublime-theme
Last active June 27, 2022 19:05
Sublime Text 3 dark sidebar theme
/*
Sublime Text 3 Dark Sidebar Theme
Marc Lepage
Darkens the sidebar to match Goto Anything and the tab bar.
To use (Mac OS X), copy this file to:
~/Library/Application Support/Sublime Text 3/Packages/User/Default.sublime-theme
@chronossc
chronossc / gist:7439737
Created November 12, 2013 22:13
meld dark theme, add it to ~/.gtkrc-2.0
style "meld-color-scheme-user"
{
# inserted line(s), also edge color block for added file in dir diff
color["insert-bg"] = "#006000"
color["insert-outline"] = shade(1.5, @insert-bg)
# In dir diff, an added file's name
color["insert-text"] = "white"
# Color block on edge for missing file in dir diff
color["delete-bg"] = "#800000"
@jnv
jnv / devise.cs.yml
Last active January 13, 2020 12:34 — forked from bver/devise.cs.yml
Czech translation for Devise
#
# Czech translation for Devise - config/locales/devise.cz.yml
# 'cs' locale by https://github.com/bver
# Feel free to correct my translation.
#
# Note: devise.failure.invalid was intentionally changed from "email" to "identity" -
# - not all configurations use config.authentication_keys = [ :email ]
#
# Additional translations at http://github.com/plataformatec/devise/wiki/I18n
@eventualbuddha
eventualbuddha / seed_file.rb
Created July 9, 2010 01:51
SeedFile, a helper for doing database setup in a Rails 3 app
# Helper class for importing files with records to the database.
class SeedFile
def self.import(path)
new(path).import
end
attr_reader :path
def initialize(path)
@path = Pathname(path)