Skip to content

Instantly share code, notes, and snippets.

@adamturtle
adamturtle / tampermonkey-copy-jira-number-to-clipboard.js
Last active November 26, 2021 15:30
Copy Jira issue number to clipboard
AJS.$(document).ready(function () {
function copyStringToClipboard (str) {
var el = document.createElement('textarea');
el.value = str;
el.setAttribute('readonly', '');
el.style = {position: 'absolute', left: '-9999px'};
document.body.appendChild(el);
el.select();
document.execCommand('copy');
@adamturtle
adamturtle / tampermoney-open-jira-issue-link-in-new-tab.js
Last active July 3, 2020 15:50
Open Jira issue links in new tab
@adamturtle
adamturtle / ToggleZoomAudio.script
Last active February 6, 2019 15:10
Toggle the microphone audio in Zoom
set appName to "zoom.us"
if not is_running(appName) then
return
end if
focus(appName)
set menuName to "Meeting"
set mute to "Mute Audio"
@adamturtle
adamturtle / bookmarklet.js
Last active March 10, 2017 15:34
A bookmarklet to set the speed of any HTML5 video (Youtube, Laracasts, etc)
javascript:!function(){function c(b){a.playbackRate=parseFloat(b)}let a=document.getElementsByTagName("video")[0],b=a.playbackRate;c(prompt("Enter playback speed",null===b?1.5:b))}();
@adamturtle
adamturtle / gist:5fdd7a6b24533958a7e3
Last active March 21, 2016 17:56
Sublime Text Configuration
{
"auto_complete": true,
"bold_folder_labels": true,
"caret_style": "phase",
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme",
"detect_indentation": false,
"dfont_face": "InputMono-Regular",
"fade_fold_buttons": false,
"font_face": "Consolas",
"font_options":
@adamturtle
adamturtle / .inputrc
Created December 16, 2015 16:43
My .inputrc file
set completion-ignore-case On
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.19370138645172119</real>
<key>Green Component</key>
<real>0.15575926005840302</real>
@adamturtle
adamturtle / .slate
Created December 16, 2015 16:40
My .slate file
# Aliases
alias rightMonitorVertOffset 270
alias mailOffset 220
alias mailheight (1920/4)
alias textmateheight (1920-${mailheight})
alias topLeft corner top-left resize:screenSizeX/2;screenSizeY/2
alias topRight corner top-right resize:screenSizeX/2;screenSizeY/2
alias topFull corner top-left resize:screenSizeX;screenSizeY/2
alias bottomLeft corner bottom-left resize:screenSizeX/2;screenSizeY/2
alias bottomRight corner bottom-right resize:screenSizeX/2;screenSizeY/2
@adamturtle
adamturtle / style.css
Created September 19, 2014 17:33
Full width div break container
.break {
margin-left:-100%;
margin-right:-100%;
}
/**
* Takes a jQuery collection and wraps each 'groupSize' items with 'wrapHtml'
* Example: $('#Example span').wrapInGroups('<div/>', 4);
* Will wrap every 4 span's inside #Example with a div
* See for yourself: http://jsfiddle.net/M9ZFh/
* Author: iMoses (imoses.g@gmail.com)
*/
(function($) {
$.fn.wrapInGroups = function(wrapHtml, groupSize) {
var selector = this.selector;