Skip to content

Instantly share code, notes, and snippets.

View skanjo's full-sized avatar

Samer Kanjo skanjo

View GitHub Profile
@skanjo
skanjo / convert-postman-to-insomnia.js
Created November 8, 2022 19:53 — forked from wesleyegberto/convert-postman-to-insomnia.js
Script to convert a Postman backupt to Insomnia
/**
* Script to parse a Postman backupt to Insomnia keeping the same structure.
*
* It parses:
* - Folders
* - Requests
* - Environments
*
* Notes: Insomnia doesn't accept vars with dots, if you are using you must replace yours URLs manually (see ENVIRONMENTS_EXPORTS).
*/
@skanjo
skanjo / outliersFilter.js
Created August 11, 2020 02:45 — forked from ogun/outliersFilter.js
A Javascript function to filter an array of values for outliers by using an interquartile filter
function filterOutliers(someArray) {
if(someArray.length < 4)
return someArray;
let values, q1, q3, iqr, maxValue, minValue;
values = someArray.slice().sort( (a, b) => a - b);//copy array fast and sort
if((values.length / 4) % 1 === 0){//find quartiles
@skanjo
skanjo / .gitignore_global
Created March 23, 2020 05:32 — forked from jacobtomlinson/.gitignore_global
An example global gitignore file
# An example global gitignore file
#
# Place a copy if this at ~/.gitignore_global
# Run `git config --global core.excludesfile ~/.gitignore_global`
# Compiled source #
###################
*.com
*.class
*.dll
@skanjo
skanjo / gist:9044d7efcaacc2ff49b0417a2b25abd5
Created August 17, 2019 20:23 — forked from digitaljhelms/gist:4287848
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch

Mastering Programming - by Kent Beck

From years of watching master programmers, I have observed certain common patterns in their workflows. From years of coaching skilled journeyman programmers, I have observed the absence of those patterns. I have seen what a difference introducing the patterns can make. Here are ways effective programmers get the most out of their precious 3e9 seconds on the planet. The theme here is scaling your brain. The journeyman learns to solve bigger problems by solving more problems at once. The master learns to solve even bigger problems than that by solving fewer problems at once. Part of the wisdom is subdividing so that integrating the separate solutions will be a smaller problem than just solving them together.

Time

Slicing - Take a big project, cut it into thin slices, and rearrange the slices to suit your context. I can always slice projects finer and I can always find new permutations of the slices that meet different needs

@skanjo
skanjo / 00-about-search-api-examples.md
Created May 31, 2019 14:21 — forked from jasonrudolph/00-about-search-api-examples.md
5 entertaining things you can find with the GitHub Search API
@skanjo
skanjo / devops_borat.dat
Created May 23, 2019 19:07 — forked from textarcana/devops_borat.dat
The wisdom of Devops Borat (RIP, may Taichi Ohno himself carry him into Valhalla!) condensed in fortune cookie format without any @ messages included. Just the goofiest random shit :)
I remember very clear I cry when I finish volume 3 of Knuth.
%
I am work on CSS SQL.
%
First sign of depression in devops is denial: you start of ignore Nagios alert.
%
In devops language is not success unless is another language++.
%
In devops you are addict to graph if first thought after orgasm is send duration and intensity to Graphite.
%
@skanjo
skanjo / instance-types.sh
Created May 14, 2019 20:42 — forked from trestletech/instance-types.sh
Get all EC2 Instance Types in All Availability Zones
#!/bin/bash
echo "Getting list of Availability Zones"
all_regions=$(aws ec2 describe-regions --output text --query 'Regions[*].[RegionName]' | sort)
all_az=()
while read -r region; do
az_per_region=$(aws ec2 describe-availability-zones --region $region --query 'AvailabilityZones[*].[ZoneName]' --output text | sort)
while read -r az; do
@skanjo
skanjo / logging.cljc
Created October 22, 2018 18:13 — forked from caskolkm/logging.cljc
Simple Clojurescript logging using Google Closure logging tools, now in cljc :)
(ns app.logging
(:refer-clojure :exclude [time])
(:require #?(:clj [clojure.tools.logging :as log]
:cljs [goog.log :as glog]))
#?(:cljs (:import goog.debug.Console)))
#?(:cljs
(def logger
(glog/getLogger "app")))
@skanjo
skanjo / sha256
Created September 19, 2018 17:50 — forked from jac18281828/sha256
sha256 command line utility
#!/usr/bin/env /bin/sh
# SHA 256 based on openssl
#
# sha256 similar to the classic "md5sum" command line
#
if [ ${#} -gt 0 ]
then
# iterate over all arguments