Skip to content

Instantly share code, notes, and snippets.

View NigelThorne's full-sized avatar

Nigel Thorne NigelThorne

View GitHub Profile
@NigelThorne
NigelThorne / gen_jira.rb
Last active February 17, 2020 01:05
Generate issues in Jira from a list
require 'rubygems'
require 'jira-ruby'
require 'awesome_print'
def get_jira_client()
options = {
:username => 'xxx',
:password => 'xxx',
:site => 'http://jira.xxx:80/',#'http://mydomain.atlassian.net:443/',
@NigelThorne
NigelThorne / print_jiras.rb
Created August 12, 2016 14:02
Print Jira to cards
require 'rubygems'
require 'jira-ruby'
require 'slim'
# args [name, pass, projectid]
def get_jira_client()
options = {
:username => ARGV[0],
:password => ARGV[1],
@NigelThorne
NigelThorne / howto-manually-add-trust-cert-to-rubygems.md
Last active April 9, 2016 06:37
Workaround RubyGems' SSL errors on Ruby for Windows (RubyInstaller)

SSL upgrades on rubygems.org and RubyInstaller versions

UPDATE 2014-12-21: RubyGems 1.8.30, 2.0.15 and 2.2.3 have been released. It requires manual installation, please see instructions below.


Hello,

If you reached this page, means you've hit this SSL error when trying to

@NigelThorne
NigelThorne / ConsoleHere.reg
Created March 3, 2016 02:25
WIndows: Open Console2 console in current location context menu
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\Console2]
@="Console Here"
[HKEY_CLASSES_ROOT\Directory\shell\Console2\command]
@="C:\\ProgramData\\chocolatey\\bin\\Console.exe"
[HKEY_CLASSES_ROOT\Directory\Background\shell\Console2]
@="Console Here"
[HKEY_CLASSES_ROOT\Directory\Background\shell\Console2\command]
@="C:\\ProgramData\\chocolatey\\bin\\Console.exe"
@NigelThorne
NigelThorne / youtube_hide_button.js
Created December 21, 2015 03:01
Control Freak Script for adding "hide" button to YouTube. So you can listening to music without looking like you are watching music videos.
// add libs
// http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js
// https://raw.githubusercontent.com/hazzik/livequery/master/dist/jquery.livequery.min.js
$("#upload-btn").livequery(function(){
$("<button id='hide-btn'>Hide</button>").insertAfter("#upload-btn");
$('#hide-btn').click(function(){
if ( $('video').css('visibility') == 'hidden' )
@NigelThorne
NigelThorne / collate_and_rescale_pdf.sh
Created October 27, 2015 12:25
Shell script to take two pdfs (one all odd pages, one all even) and merge them then rescale the images to reduce the file size for emailing.
# Example script to collate and reduce size of scanned pdf. Idea taken from Stackoverflow answers
# interleave two pdfs as one
pdftk A=Emma\ front\ half.pdf B=Emma\ back\ half.pdf shuffle A B output Emma.pdf
# convert to postscript
pdf2ps Emma.pdf Emma.ps
# convert back with defined resolution 150
ps2pdf -dPDFSETTINGS=/screen -dDownsampleColorImages=false -dColorImageResolution=150 -dColorImageDownsampleType=/Bicubic Emma.ps Emma_ps150b.pdf
@NigelThorne
NigelThorne / zoom.js
Last active October 20, 2015 05:42
Zoom button for appear.in. Makes "enlarged" screen even bigger. click twice to get massive. (note: close chat area)
/* knicked the Wait for load script from http://stackoverflow.com/questions/5525071/how-to-wait-until-an-element-exists */
/* https://gist.github.com/buu700/4200601 */
(function ($) {
/**
* @function
* @property {object} jQuery plugin which runs handler function once specified element is inserted into the DOM
* @param {function} handler A function to execute at the time when the element is inserted
* @param {bool} shouldRunHandlerOnce Optional: if true, handler is unbound after its first invocation
@NigelThorne
NigelThorne / InvertCol.md
Last active October 20, 2015 02:48
Invert brightness of #RRGGBB values references in text. Used to transform tmTheme files to with with NegativeScreen

Takes a file. Returns (stdout) a version with all references to colors in the format #rrggbb replaced with the inverse color (where inverse means the brightness is inverted)

I use this with NegativeScreen.exe and Chrome plugin "Deluminate" to make most apps have a black background.

@NigelThorne
NigelThorne / Readme.md
Last active October 19, 2015 06:29
Atlassian Slack - show build status from Teamcity. Ignore tester branches. Add Buttons to resize code review window.

installation

  • Install controlfreak in chrome
  • Add script for PullRequest page
  • Add JQuery library