Skip to content

Instantly share code, notes, and snippets.

@0x4a
0x4a / pinboard_fixBookmarks.js
Last active February 28, 2020 06:31
#userscript for #pinboard to edit links in external window. Good to fix bookmarks with broken encoding in description, that brake site-js
// ==UserScript==
// @name pinboard_fixBookmarks
// @namespace 0x4a.net
// @version 0.4.14
// @description Add an edit button to edit links from pinboard.in in a popup. Filter bookmarks for broken encoding (breaks page function) or youtube-links. Get missing titles for youtube via JSON.
// @author Daniel Jackel
// @copyright 2020, Daniel Jackel ([email protected])
// @license MIT
// @include https://pinboard.in/u:*
// @include https://pinboard.in/add*
// Original author fwed ([email protected])
// Modified from
// https://gist.github.com/anonymous/2cca33d376f7f924fdaa67891ad098cc
// https://medium.com/@fw3d/auto-archive-emails-in-gmail-after-2-days-1ebf0e076b1c
function gmailAutocleanup() {
var delete_after = "3d";
var archive_after = "1m";
// ifttt Weather
@0x4a
0x4a / Plentymarkets_Terra.css
Created April 9, 2018 21:06
#userstyle for #plentymarkets backend COMPACT MODE with tweaks
/* Source: https://forum.plentymarkets.com/t/finale-abschaltung-der-alten-blauen-backend-oberflaeche/179294/109 with some tweaks */
table.PlentyGuiTable tr td {
line-height: 20px !important;
}
#AdminStartpageSortableId table td {
border-bottom: 1px solid #cacaca !important;
}
#AdminStartpageSortableId table tr {
border-bottom: 1px solid #9d9d9d !important;
}
@0x4a
0x4a / addHTML_toSelection.ahk
Created April 3, 2018 21:44
wrap clipboard in html tags
; only apply to editor window (Notepad2-mod)
#ifWinActive ahk_class Notepad2U
{
$^+b::htmlBold() ; STRG + Shift + B
}
htmlBold()
{
oldClip := ClipboardAll
Send ^x
@0x4a
0x4a / userChrome.css
Last active November 15, 2017 04:21
Firefox 57 Interface Tweaks
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
.tab-background {
background-attachment: none!important;
background-color: #cccdcf!important;
background-image: none!important;
}
.tab-background[selected="true"] {
background-attachment: none!important;
@0x4a
0x4a / curl_header_loop.sh
Created August 12, 2017 21:02
get the first 100 bytes of a webpage every minute #bash #script
#!/bin/bash
timestamp() {
date +"%Y-%m-%d_%H-%M-%S"
}
while :
do
curl -s -k https://www.google.com | head -c 100 > curl_$(timestamp).html
echo saved: $(timestamp)
sleep 60
@0x4a
0x4a / curl_header_loop.bat
Last active August 11, 2017 04:24
get the first 100 bytes of a webpage every minute
@ECHO OFF
:loop
SET timestamp=%time:~0,2%-%time:~3,2%-%time:~6,2%
set timestamp=%timestamp: =0%
curl.exe -s -k https://www.google.com | head -c 100 > curl_%timestamp%.html
ECHO saved: %timestamp%
sleep 60
GOTO loop
@0x4a
0x4a / spon-plus.js
Created May 28, 2017 23:01
removes paywall for spiegel online plus
(function(){function a(c){if(c){for(var e="",f=0;f<c.length;f++)e+=b[c.charCodeAt(f)]||String.fromCharCode(c.charCodeAt(f)-1);return e}}var b={32:" ",177:"&",178:"!",180:";",181:"="};$("p.obfuscated").contents().filter(function(){return"A"!==this.tagName}).each(function(){this.textContent=a(this.textContent)}).parentsUntil(".spArticleContent").attr("class","").find("svg").remove()})();
@0x4a
0x4a / log-to-file.vb
Last active April 26, 2017 16:56
Excel VBA log-to-file
Private Const VERBOSE As Boolean = false
Private Function log(text as String)
Debug.Print text
If VERBOSE Then
Dim n As Integer
n = FreeFile()
Dim File As String
File = ActiveWorkbook.Path & "\debug.txt"
If Dir(File) = "" Then
@0x4a
0x4a / wox_0x4a.xaml
Created April 7, 2017 19:14
a wox #theme
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Base.xaml"></ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
<Style x:Key="QueryBoxStyle" BasedOn="{StaticResource BaseQueryBoxStyle}" TargetType="{x:Type TextBox}">
<Setter Property="Background" Value="#5e5b5b"/>
<Setter Property="Foreground" Value="#d1d1d1" />