Skip to content

Instantly share code, notes, and snippets.

@0x4a
0x4a / removeNewline.ahk
Created January 16, 2014 03:13
remove newline character from #clipboard #work #string #ahk
; remove newline characters
; Win + X
#x::
Send ^x
StringReplace, clipboard, clipboard,`r`n,, All
Send ^v
return
@0x4a
0x4a / YouScrobbler.diff
Last active August 29, 2015 13:56
YouScrobbler 1.2.1: display button below the video - https://userscripts.org/scripts/show/119694 #youtube #userscript #mod #diff
--- youscrobbler.user.js Tue Sep 09 23:39:36 2014
+++ youscrobbler.user.mod.js Tue Sep 09 23:54:07 2014
@@ -2,7 +2,7 @@
// @name YouScrobbler
// @namespace userscripts.org
// @author http://www.lukash.de
-// @description Scrobbles the currently watching YouTube video to last.fm.
+// @description Scrobbles the currently watching YouTube video to last.fm. - modified by github.com/0x4a: moved button below video, changed autoscrobble-time from 3/4 to 2/3
// @identifier http://userscripts.org/scripts/source/119694.user.js
// @include http://*.youtube.com/watch?*v=*
@0x4a
0x4a / ff-editor-ace.htm
Created March 10, 2014 13:25
#html #editor with highlighting in #firefox - simply paste the code in the location bar
data:text/html, <script src="http://ajaxorg.github.io/ace-builds/src-min/ace.js" data-ace-base="src" charset="utf-8" type="text/javascript"></script> <div id="ed" style="position:absolute;top:0;left:0;right:0;bottom:0"></div> <script>ed=ace.edit("ed");</script>
@0x4a
0x4a / ff-editor-plain.htm
Created March 10, 2014 13:28
one line #editor in #firefox - just paste the code in the location bar
data:text/html, <html contenteditable>
@0x4a
0x4a / git-initial-commit-alias.sh
Last active August 29, 2015 13:57
#git #cli - initial empty commit
#!/bin/bash
# make an alias
git config --global alias.initempty '!git init && git commit -m "(initial empty commit)" --allow-empty'
@0x4a
0x4a / local-rsync.sh
Created March 10, 2014 13:37
use rsync to copy files locally #backup #cli
#!/bin/bash
rsync -rvhW --no-compress --size-only --progress <source> <destination>
@0x4a
0x4a / highlight-selector.js
Last active August 29, 2015 13:57
highlight selector in #color with #jQuery
$(".foobar").css('outline', '1px solid red')
@0x4a
0x4a / pasteHexcolor.ahk
Created March 10, 2014 16:48
takes a rrggbb hex #color number from #clipboard and pastes it to standard windows color selector as three dec numbers #ahk #work #tool
#NoEnv
#SingleInstance, Force
#Warn
SendMode Input
OnExit, ExitSub
; takes a rrggbb hex number from clipboard and pastes it to standard
; windows color selector as three dec numbers
; pick colors
@0x4a
0x4a / insertDateTime.ahk
Created March 10, 2014 16:56
insert timestamp (time, date or both) at cursor - #time #string #ahk #work
; insert date - win + y
#y::Send %A_YYYY%-%A_MM%-%A_DD%{Space}
; insert time - win + a
#a::Send %A_Hour%-%A_Min%-%A_SEC%{Space}
; insert date + time - win + q
#q::Send %A_YYYY%-%A_MM%-%A_DD%_-_%A_Hour%-%A_Min%-%A_SEC%{Space}
@0x4a
0x4a / debug.js
Last active August 29, 2015 13:57
helper function for logging, debug-mode is saved to localstorage, copyright belongs to the two ppl from stackoverflow I stole this from, see comments #jQuery #debug #helper
$(function() {
debug.init();
//debug.load();
});
(function(debug, $, undefined) {
// https://stackoverflow.com/a/14223953
// https://stackoverflow.com/a/1216743