Skip to content

Instantly share code, notes, and snippets.

View kjeldahl's full-sized avatar

Jacob Kjeldahl kjeldahl

View GitHub Profile
@kjeldahl
kjeldahl / pivotal_copy_markdown_link.js
Last active January 7, 2022 11:26
Copy markdown link instead of raw link in PivotalTracker
@kjeldahl
kjeldahl / linkify.js
Last active March 26, 2021 12:53 — forked from paradox460/linkify.js
Linkify PivotalTracker links on github
// ==UserScript==
// @name Linkify Pivotal Tracker links on Github
// @namespace http://paradox.io/linkify-pivotal-links
// @version 0.1
// @description Converts pivotal tracker story links [#123456789] to actual links
// @author Jeff Sandberg
// @match *://github.com/*
// @grant none
// @downloadURL https://gist.githubusercontent.com/paradox460/fa76ecacdbb47d8fa9100fbf9305a97e/raw
// @require https://cdn.jsdelivr.net/gh/padolsey/findAndReplaceDOMText@0.4.5/src/findAndReplaceDOMText.min.js
@kjeldahl
kjeldahl / np_zendesk.user.js
Last active October 31, 2018 11:05
NettoPower ZenDesk integration
// ==UserScript==
// @name ZenDesk NettoPower Integration
// @namespace http://www.nettopower.dk/
// @version 1.4
// @description Adds links from tickets to NettoPower Admin
// @author Jacob Kjeldahl (jkj@nettopower.dk)
// @match https://nettopower.zendesk.com/agent/*
// @grant none
// ==/UserScript==
@kjeldahl
kjeldahl / time_recorder.js
Last active October 29, 2018 08:24
TamperMonkey script for TimeLog on simpeltregnskab.dk
// ==UserScript==
// @name Play pause for Simpelt Regnskab
// @namespace http://www.kjeldahl.it
// @version 0.2
// @description Adds a play / pause button in the top navigation next to the TimeLog link so time tracking can be started from there
// @author Jacob Kjeldahl
// @match https://simpeltregnskab.dk/*
// @grant none
// ==/UserScript==
$(function(){
@kjeldahl
kjeldahl / README.txt
Last active January 2, 2016 16:59 — forked from lhoeg/README.txt
Get the number of hours in day, as this may vary depending on DST changes.
A tiny and very simple pasword generator
Modulus 10 (luhn) checksum validator.
This may for instance be credit card or GSRN number validation using the luhn algorithm.
See http://en.wikipedia.org/wiki/Luhn_algorithm
Implementation using Rick Hull's comment on http://www.missiondata.com/blog/web-development/25/credit-card-type-and-luhn-check-in-ruby/
@kjeldahl
kjeldahl / calculations_group_by_multiple_columns.rb
Created July 7, 2009 20:29
A patch to ActiveRecord 2.1.0 to allow multiple columns in grouped calculations
# A patch to ActiveRecord 2.1.0 to allow multiple columns in grouped calculations
# Thanks to Eric Lindvall for the patch at http://tinyurl.com/luas8x which needed only slight modifcations to work with version 2.1.0
module ActiveRecord
module Calculations #:nodoc:
module ClassMethods
def construct_calculation_sql(operation, column_name, options) #:nodoc:
operation = operation.to_s.downcase
options = options.symbolize_keys
#!/bin/bash
#
# Copyright (c) 2007 Jean-Francois Richard <jean-francois@richard.name>
# (c) 2008 Mauricio Fernandez <mfp@acm.org>
# (c) 2009 Jacob Kjeldahl <jkj@lenio.dk>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
@kjeldahl
kjeldahl / load_rake_tasks_from_gems.rb
Created April 30, 2009 11:28
Loads rake tasks from gems configured in config/environment.rb
# DESCRIPTION
# -----------
#
# Loads rake tasks from gems configured in config/environment.rb
#
# Use it by adding it to your Rakefile
#
# Temporary work around for
# http://rails.lighthouseapp.com/projects/8994/tickets/59-when-loading-a-plugin-via-rubygems-rake-tasks-aren-t-included
# Based on the patch by James Healy