Skip to content

Instantly share code, notes, and snippets.

@brainysmurf
brainysmurf / README.md
Last active June 21, 2024 05:53
Things one can get used to for the V8 Google Apps Scripts engine

Things one can get used to for the V8 Google Apps Scripts engine

A bit of a monologue about various syntax changes and adjustments in learning and using the tool.

Logging is slooooooow

I know. Everyone knows.

That's why I wrote a library that writes to a spreadsheet instead. Ever since I started using it I'm far more productive. I don't know how people are still putting with that god-awful lagging logger.

@c-l-nguyen
c-l-nguyen / init.lua
Last active October 20, 2024 19:33
Hammerspoon virtual numpad for macOS
k = hs.hotkey.modal.new('ctrl-shift', 'n')
function k:entered() hs.alert'Virtual Numpad' end
function k:exited() hs.alert'Exit Virtual Numpad' end
k:bind('ctrl-shift', 'n', function() k:exit() end)
hs.fnutils.each({
{ key='j', padkey='pad1'},
{ key='k', padkey='pad2'},
{ key='l', padkey='pad3'},
{ key='u', padkey='pad4'},
@andkirby
andkirby / ruby-bash-win.sh
Last active January 17, 2019 12:11
Fetch Ruby interpreter from GitBash for Windows or Cygwin similar CLI.
#!/usr/bin/env bash
################################################################################
# This script can install RUBY binaries on Windows in Bash.
#
# Link to this file:
# https://gist.github.com/andkirby/caf9e825e83f38ad98721956d6e0107c/raw/ruby-bash-win.sh
#
# Download latest version by command in GitBash Windows console:
# $ curl -Ls bit.ly/ruby-bash-win | bash
#
@ledlogic
ledlogic / EEPROMExample.ino
Created January 24, 2015 16:28
Example for Arduino EEPROM read / writes
/////////////////////////////////////////////////////////////////
// Created by Kevin Elsenberger //
// June 2, 2013 //
// elsenberger.k at gmail.com //
// from http://playground.arduino.cc/Code/EEPROMReadWriteLong //
/////////////////////////////////////////////////////////////////
//Needed to access the eeprom read write functions
#include <EEPROM.h>
@jashkenas
jashkenas / semantic-pedantic.md
Last active September 5, 2024 17:03
Why Semantic Versioning Isn't

Spurred by recent events (https://news.ycombinator.com/item?id=8244700), this is a quick set of jotted-down thoughts about the state of "Semantic" Versioning, and why we should be fighting the good fight against it.

For a long time in the history of software, version numbers indicated the relative progress and change in a given piece of software. A major release (1.x.x) was major, a minor release (x.1.x) was minor, and a patch release was just a small patch. You could evaluate a given piece of software by name + version, and get a feeling for how far away version 2.0.1 was from version 2.8.0.

But Semantic Versioning (henceforth, SemVer), as specified at http://semver.org/, changes this to prioritize a mechanistic understanding of a codebase over a human one. Any "breaking" change to the software must be accompanied with a new major version number. It's alright for robots, but bad for us.

SemVer tries to compress a huge amount of information — the nature of the change, the percentage of users that wil

@frozenminds
frozenminds / clean-magento_ce-db-extended.sql
Created May 12, 2014 12:54
Clean Magento database of junk and unnecessary data
--
-- Magento CE database clean-up extended
--
-- This is an extended clean-up which will clean search, import/export, reports, etc.
--
-- @author Constantin Bejenaru <[email protected]>
-- @copyright Copyright (c) Constantin Bejenaru (http://frozenminds.com/)
-- @license http://www.opensource.org/licenses/mit-license.html MIT License
--
@bmihaylov
bmihaylov / getgist
Created March 17, 2014 12:04
Download and unpack a gist with curl
#!/bin/sh
curl "$1/download" | tar zx --strip-components 1
@sneal
sneal / Vagrantfile.rb
Last active May 13, 2023 15:06
Gem install from Vagrantfile
require "rubygems"
# Install the Chef gem into the private Vagrant gem repo
CHEF_VERSION = '11.8.2'
def with_vagrant_gem_path
@old_gem_path = ENV["GEM_PATH"]
@old_gem_home = ENV["GEM_HOME"]
Gem.paths = ENV["GEM_PATH"] = ENV["GEM_HOME"] = "#{ENV['HOME']}/.vagrant.d/gems"
return yield
@hiono
hiono / add_ssh_config.sh
Last active October 24, 2016 14:03
Add a vagrant ssh-config data to ".ssh/config" file. Require plugin: vagrant-global-status
#!/bin/bash
SSH=$HOME/.ssh
[ ! -f $SSH/config ] && touch $SSH/config
[ -f $SSH/config ] && [ ! -f $SSH/config.orig ] && mv $SSH/config{,.orig}
rm -f $SSH/config.vagrant
touch $SSH/config.vagrant
for dir in $(vagrant global-status | grep $HOME)
do
pushd $dir > /dev/null
/*
* FancyBox - jQuery Plugin
* Simple and fancy lightbox alternative
*
* Examples and documentation at: http://fancybox.net
*
* Copyright (c) 2008 - 2010 Janis Skarnelis
* That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
*
* Version: 1.3.4 (11/11/2010)