Skip to content

Instantly share code, notes, and snippets.

Orest Ivasiv halyph

Block or report user

Report or block halyph

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
halyph /
Created Sep 2, 2019 — forked from lounagen/
Example for decoding a JWT Payload with your Shell (bash, zsh...)


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

BASE64_DECODER="base64 -d" # option -d for Linux base64 tool
echo AAAA | base64 -d > /dev/null 2>&1 || BASE64_DECODER="base64 -D" # option -D on MacOS

decode_base64_url() {
  local len=$((${#1} % 4))
  local result="$1"
  if [ $len -eq 2 ]; then result="$1"'=='

IT Department Audit Blueprint

As IT consultant I work with clients to make cool things happen. My first step in a new project is always to do an audit of the client’s IT capabilities. If the client does not request it I do it anyway - because it is implicitly expected from me to know what is going on.

The following checklist roughly resembles my way of doing the audit. Every client is different, so the checklist is not a one-fits-all solution. But it was always a big help for me to get started. Checklist items on top of a section are more important than items at the bottom.

The golden rule is: If an important checklist item is missing then this might already point to a potential problem. For instance - if a global roadmap is missing then this might mean teams and people have no common goals. But you can fix it easily which will lead to great results.

You can also use this audit if you run an IT department. Make sure you do it once a year and follow up on things that are missing or need improvement.

halyph / gist:5e7d01af32d061778df285e7372f2733
Created May 31, 2019 — forked from sidharthkuruvila/gist:3154845
Utility to functions to convert between camel case and underscore separated names
View gist:5e7d01af32d061778df285e7372f2733
* Takes a camel cased identifier name and returns an underscore separated
* name
* Example:
* camelToUnderscores("thisIsA1Test") == "this_is_a_1_test"
def camelToUnderscores(name: String) = "[A-Z\\d]".r.replaceAllIn(name, {m =>
"_" +
View makefile
# Go parameters
halyph / gist:53aff19609d3555abeec3fa8334f68ae
Created Nov 20, 2017 — forked from graffic/gist:6c15f8c2b4f0f208939e
Uncle bob "Framework Whipped" original post
View gist:53aff19609d3555abeec3fa8334f68ae

Framework Whipped

Uncle Bob 11 May 2014 Craftsmanship Frameworks are powerful tools. We'd be lost without them. But there's a cost to using them.

The relationship between a programmer and a framework is similar to the relationship between an executive and an administrative assistant. The framework takes care of all the necessary details, so that the executive can focus on high level decisions.

Think of Rails, or Spring, or JSF, or Hibernate. Think about what writing a web system would be like without these frameworks to help you. The idea is disheartening. There'd be so many little piddling details to deal with. It'd be like endeavoring to construct a mnemonic memory circuit using stone knives and bearskins[1].

And so we gleefully use those glittering frameworks. We joyously intermingle our code with the frameworks' in anticipation of all the benefits they promise. We make the mistake that so many executives have made before us. We marry our secretary.

halyph / PropertyTests.scala
Created Jun 6, 2017 — forked from davidallsopp/PropertyTests.scala
Examples of writing mixed unit/property-based (ScalaTest with ScalaCheck) tests. Includes tables and generators as well as 'traditional' tests.
View PropertyTests.scala
* Examples of writing mixed unit/property-based (ScalaCheck) tests.
* Includes tables and generators as well as 'traditional' tests.
* @see
* @see
import org.scalatest._
halyph / history.txt
Created Nov 22, 2016 — forked from unak/history.txt
The History of Ruby
View history.txt
* Only the releases of the stable versions are enumerated in principle. The releases of the unstable versions especially considered to be important are indicated as "not stable."
* The branches used as the source of each releases are specified, and the branching timing of them are also shown. BTW, before subversionizing of the repository, the term called "trunk" was not used, but this list uses it in order to avoid confusion.
* In order to show a historical backdrop, big conferences (RubyKaigi, RubyConf and Euruko) are also emurated. About the venues of such conferences, general English notations are adopted, in my hope.
* ruby_1_8_7 branch was recut from v1_8_7 tag after the 1.8.7 release becaouse of an accident.
* 1.2.1 release was canceled once, and the 2nd release called "repack" was performed. Although there were other examples similar to this, since the re-releases were performed during the same day, it does not write clearly in particular.
* Since 1.0 was released with the date in large quantities,
halyph / PomToSbt.scala
Created Sep 14, 2016 — forked from mslinn/PomToSbt.scala
Convert pom.xml to build.sbt
View PomToSbt.scala
import scala.xml._
// To convert a Maven pom.xml to build.sbt:
// 1) Place this code into a file called PomToSbt.scala next to pom.xml
// 2) Type scala PomtoSbt.scala > build.sbt
// The dependencies from pom.xml will be extracted and place into a complete build.sbt file
// Because most pom.xml files only refernence non-Scala dependencies, I did not use %%
val lines = (XML.load("pom.xml") \\ "dependencies") \ "dependency" map { dependency =>
val groupId = (dependency \ "groupId").text
val artifactId = (dependency \ "artifactId").text
halyph / .bash_profile
Created Jul 27, 2016 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
View .bash_profile
# ---------------------------------------------------------------------------
# Description: This file holds all my BASH configurations and aliases
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
halyph / .bash_profile
Created Jul 27, 2016 — forked from stephenll/.bash_profile
.bash_profile file on Mac OS X
View .bash_profile
# ---------------------------------------------------------------------------
# Description: This file holds all my BASH configurations and aliases.
# Much of this was originally copied from:
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
You can’t perform that action at this time.