Skip to content

Instantly share code, notes, and snippets.

@korkey128k
korkey128k / index.js
Created April 27, 2024 02:04
Show local time on spc.nws.gov
// ==UserScript==
// @name NWS Thunderstorm outloook; Show local time
// @namespace http://tampermonkey.net/
// @version 2024-04-26
// @description The NWS provides great maps! Their web interface needs help.
// @author You
// @match https://www.spc.noaa.gov/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=noaa.gov
// @grant none
// ==/UserScript==
// ==UserScript==
// @name Add Chain Icons to Watchlist
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Add icons to tokens in your watchlist for dexscreener
// @author Korkey128k
// @match https://dexscreener.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=dexscreener.com
// @grant none
// ==/UserScript==
// ==UserScript==
// @name Add Quick Calculations to 1inch
// @namespace http://tampermonkey.net/
// @version 0.5
// @description Add quick links on 1inch, similar to trading interfaces
// @author Korkey128k
// @match https://app.1inch.io/
// @icon https://www.google.com/s2/favicons?domain=1inch.io
// @grant none
// @downloadURL https://gist.githubusercontent.com/Korkey128k/bce740d1c235cdaa14d7268eb79ce423/raw
// ==UserScript==
// @name Add Quick Calculations to Uniswap
// @namespace http://tampermonkey.net/
// @version 0.6.0
// @description Add quick links on uniswap, similar to trading interfaces
// @author Korkey128k
// @match https://app.uniswap.org/
// @match https://uniswap.hedron.pro/*
// @match https://*.pulsex.com/*
// @icon https://www.google.com/s2/favicons?domain=uniswap.org
@korkey128k
korkey128k / rules2filters.py
Created September 13, 2018 12:17 — forked from adamwalz/rules2filters.py
Python script to export Apples Mail.app rules into gmail filters
from plistlib import readPlist
from cgi import escape
from lxml.etree import SubElement as sub
import lxml.etree
# Load in apple mail rules file
rules_file = '~/Library/Mail/V2/MailData/SyncedRules.plist'
rules = readPlist(rules_file)
# Create gmail filters xml header
@korkey128k
korkey128k / awesome_nested_set_input.rb
Created December 2, 2016 22:14
Awesome Nested Input Formtastic Input Class
class AwesomeNestedSetInput < Formtastic::Inputs::CheckBoxesInput
def to_html
unless options[:nested_set]
super
else
nested_wrapping(options)
end
end
def nested_wrapping(options)
class String
def to_bool
return true if self == true || self =~ (/^(true|t|yes|y|1|1\.0)$/i)
return false if self == false || self.blank? || self =~ (/^(false|f|no|n|0)$/i)
raise ArgumentError.new("invalid value for Boolean: \"#{self}\"")
end
end
class Fixnum
def to_bool
@korkey128k
korkey128k / gist:5b207ec04aba2c21bee6
Last active August 29, 2015 14:22
Return where a website is hosted, pass -m for mail
function double_host {
function lookup {
host $1 | grep 'has address' | host `awk {'print $4'}` | awk {'print $5'} | sed -e 's/[.]$//'
}
NUMARGS=$#
if [ $NUMARGS -eq 1 ]; then
echo "A Record"
lookup $1
@korkey128k
korkey128k / Checker-Divider.markdown
Created July 15, 2014 21:54
A Pen by Corey Smith.
<?php
$xml = new DOMDocument();
$xml->validateOnParse = true;
$file_path = ''; // FilePath. Dur
if(@$xml->loadXML(file_get_contents($file_path))) :
$coordinates = $xml->getElementsByTagName('coordinates');