Skip to content

Instantly share code, notes, and snippets.

View iamso's full-sized avatar

Steve Ottoz iamso

View GitHub Profile
@iamso
iamso / .gitconfig
Created January 21, 2021 13:00 — forked from robmiller/.gitconfig
Some useful Git aliases that I use every day
#
# Working with branches
#
# Get the current branch name (not so useful in itself, but used in
# other aliases)
branch-name = "!git rev-parse --abbrev-ref HEAD"
# Push the current branch to the remote "origin", and set it to track
# the upstream branch
publish = "!git push -u origin $(git branch-name)"
#!/bin/bash
# Replaces all _lightweight_ Git tags with an _annotated_ tag
# in the current repository
echo "Converting lightweight tags to annotated tags..."
for tag in $(git tag)
do
@iamso
iamso / mac usb installer.md
Last active January 16, 2024 08:49
Mac OS X / macOS USB Installer

Mac OS X / macOS USB Installer

10.11 El Capitan

sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app && say USB Installer Created

10.12 Sierra

@iamso
iamso / generate-ssh-key.sh
Created March 23, 2019 12:22 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/mozilla_rsa
@iamso
iamso / swipe.js
Created December 6, 2017 17:40 — forked from SleepWalker/swipe.js
A simple swipe detection on vanilla js
var touchstartX = 0;
var touchstartY = 0;
var touchendX = 0;
var touchendY = 0;
var gesuredZone = document.getElementById('gesuredZone');
gesuredZone.addEventListener('touchstart', function(event) {
touchstartX = event.screenX;
touchstartY = event.screenY;
@iamso
iamso / keybase.md
Created August 4, 2017 11:42
keybase verification

Keybase proof

I hereby claim:

  • I am iamso on github.
  • I am iamso (https://keybase.io/iamso) on keybase.
  • I have a public key ASAnb90dT-cmgkvZx6K8zPDvegGWEtiMNsBq2QzkXaj7VQo

To claim this, I am signing this object:

@iamso
iamso / promise-chain.js
Last active March 21, 2017 12:24
Nested Promise chain
// the array to loop through
const arr = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16];
// start with a resolved promise
let p = Promise.resolve();
// loop through the array
for (let i of arr) {
@iamso
iamso / hnl.mobileConsole.js
Created March 2, 2017 16:22 — forked from c-kick/hnl.mobileConsole.js
hnl.mobileConsole.js - extends JavaScript's console to display a visual console inside the webpage. Very usefull for debugging JS on mobile devices with no real console. Info and demo: http://www.hnldesign.nl/work/code/mobileconsole-javascript-console-for-mobile-devices/
/*!
* hnl.mobileConsole - javascript mobile console - v1.2.6 - 26/10/2016
* Adds html console to webpage. Especially useful for debugging JS on mobile devices.
* Supports 'log', 'trace', 'info', 'warn', 'error', 'group', 'groupEnd', 'table', 'assert', 'clear'
* Inspired by code by jakub fiala (https://gist.github.com/jakubfiala/8fe3461ab6508f46003d)
* Licensed under the MIT license
*
* Original author: @hnldesign
* Further changes, comments: @hnldesign
* Copyright (c) 2014-2016 HN Leussink
@iamso
iamso / readme.md
Created February 27, 2017 16:32
Check support for CSS transform on SVGs
@iamso
iamso / jquery.scrollToTop.js
Created February 15, 2017 22:38 — forked from monkeymonk/jquery.scrollToTop.js
ES6 jQuery plugin definition
import $ from 'jquery';
import plugin from './plugin';
class ScrollToTop {
constructor(element, options) {
const $element = $(element);
$(window).scroll(function () {
if ($(this).scrollTop() > options.offset) {
$element.fadeIn();