Skip to content

Instantly share code, notes, and snippets.

View reggi's full-sized avatar
🌺
Learning

Thomas Reggi reggi

🌺
Learning
View GitHub Profile
@DarrenN
DarrenN / get-npm-package-version
Last active April 17, 2024 16:57 — forked from yvele/get-npm-package-version.sh
Extract version from package.json (NPM) using bash / shell
# Version key/value should be on his own line
PACKAGE_VERSION=$(cat package.json \
| grep version \
| head -1 \
| awk -F: '{ print $2 }' \
| sed 's/[",]//g')
echo $PACKAGE_VERSION
@codeinthehole
codeinthehole / osx_bootstrap.sh
Last active April 28, 2024 15:26
Script to install stuff I want on a new OSX machine
#!/usr/bin/env bash
#
# Bootstrap script for setting up a new OSX machine
#
# This should be idempotent so it can be run multiple times.
#
# Some apps don't have a cask and so still need to be installed by hand. These
# include:
#
# - Twitter (app store)
@yanofsky
yanofsky / gif_maker.sh
Created March 7, 2015 21:56
How to Make a gif from a folder of images
# requirement! install imagemagick
# brew install imagemagick
# or build from source here http://www.imagemagick.org/script/binary-releases.php
#navigate to folder of the images
cd folderofmyimages/
# take every jpg in the folder and smash into a gif with a frame rate of 0.5 sec
convert -delay 50 *.jpg gif_of_my_images.gif
@rauchg
rauchg / effective-es6.md
Last active July 11, 2023 09:38
Writing ES6 today, effectively.

Effective transpiling of ES6

After publishing my article on ECMAScript 6, some have reached out to ask how I exactly I make it all work.

I refrained from including these details on the original post because they're subject to immiment obsoletion. These tools are changing and evolving quickly, and some of these instructions are likely to become outdated in the coming months or even weeks.

The main tool

When evaluating the available transpilers, I decided to use 6to5, which has recently been renamed to Babel. I chose it based on:

@jpetazzo
jpetazzo / README.md
Created January 9, 2015 17:06
Mouses Are Overrated!

Mouses Are Overrated

This script allows you to enable/disable your pointers on a Linux machine.

Usage:

mao.sh on   # enters "mouseless" mode
mao.sh off  # returns to "I can has clicks" mode

Note: if you just want to disable built-in pointers (to keep a mouse on the side

@mhart
mhart / awslambda
Last active April 14, 2019 15:38
node_modules/awslambda
#!/usr/bin/env node
var path = require('path')
var fs = require('fs')
var lib = path.join(path.dirname(fs.realpathSync(__filename)), '../lib');
require(lib + '/awslambda.js').start_runtime();
@gavinandresen
gavinandresen / BlockPropagation.md
Last active March 14, 2023 09:45
O(1) block propagation

O(1) Block Propagation

The problem

Bitcoin miners want their newly-found blocks to propagate across the network as quickly as possible, because every millisecond of delay increases the chances that another block, found at about the same time, wins the "block race."

@mrasmus
mrasmus / gist:b133ca537eff7c3ae175
Last active June 16, 2016 07:35
WavTap Uninstaller
#!/bin/bash
# Because WavTap (https://github.com/pje/wavtap) doesn't come with a straightforward way to do it. :\
# Must be run elevated. Mirrors what "make uninstall" does exactly as of June 24, 2014.
osascript -e 'tell application "WavTap"' -e 'quit' -e 'end tell'
rm -rf /Applications/WavTap.app
if [[ "$(kextstat | grep WavTap | grep -v grep)" ]]; then sudo kextunload /System/Library/Extensions/WavTap.kext; fi
rm -rf /System/Library/Extensions/WavTap.kext
rm -rf /Library/Receipts/WavTap*
rm -rf /var/db/receipts/*WavTap.*
# Node-WebKit CheatSheet
# Download: https://github.com/rogerwang/node-webkit#downloads
# Old Versions: https://github.com/rogerwang/node-webkit/wiki/Downloads-of-old-versions
# Wiki: https://github.com/rogerwang/node-webkit/wiki
# How: https://github.com/rogerwang/node-webkit/wiki/How-node.js-is-integrated-with-chromium
# 1. Run your application.
# https://github.com/rogerwang/node-webkit/wiki/How-to-run-apps
@staltz
staltz / introrx.md
Last active May 6, 2024 01:44
The introduction to Reactive Programming you've been missing