This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -x | |
PYGLOSSARY_HOME=~/projects/pyglossary | |
usage="Convert Lingvo DSL source to AppleDict\n | |
USAGE:\n | |
=====\n | |
\t${0##*/} <dictionary.dsl|dictionary.dsl.dz> \n |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# | |
# Example Usage | |
# ------------------------------------------------------------------------------- | |
# modify dates from 30-10-2024 to 2024-10-30 | |
# find-replace-in-files.py -g "*.html" "(\d\d)-(\d\d)-(\d\d\d\d)" "\3-\2-\1" | |
# ------------------------------------------------------------------------------- | |
import argparse |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# NOTES | |
# - to search recursively in subfolders pass `--glob "**/*.*"` | |
import argparse | |
import re | |
import sys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# requires Python 2 | |
# (Python 3 version: https://gist.github.com/glowinthedark/174df43f469c7ef05f6358f53afe05c6) | |
# Recursively generate index.html files for | |
# all subdirectories in a directory tree | |
########################################################################## | |
## ❗️❗️❗️ WARNING: This version is outdated and unmaintained! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// should go into the `src` folder relative to the `pom.xml` file | |
import java.io.FileInputStream; | |
import java.io.FileWriter; | |
import java.io.IOException; | |
import org.apache.poi.POITextExtractor; | |
import org.apache.poi.extractor.ExtractorFactory; | |
import org.apache.poi.openxml4j.exceptions.OpenXML4JException; | |
import org.apache.xmlbeans.XmlException; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){for(i=0;i<document.styleSheets.length;i++){document.styleSheets.item(i).disabled=true;}all=document.getElementsByTagName('*');for(i=0;i<all.length;i++){var s=all[i].style;s.cssText='';s.width='';s.padding='1px';s.margin='1px';s.fontSize='12pt';s.lineHeight='150%';if(s.position=='absolute'||s.position=='relative'||s.position=='fixed')s.position='static';}var st=document.body.style;st.paddingLeft='100px';st.paddingRight='100px';st.backgroundImage='none';st.backgroundColor='#fff';st.color='#000';})() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import suds | |
import sys | |
import lxml.etree as etree | |
def xml_pretty_print(doc): | |
return etree.tostring(doc, pretty_print = True) | |
url = "http://www.webservicex.net/stockquote.asmx?wsdl" | |
# get ticker symbol as command line arg or use default |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on buildTitle(originalText) | |
set normalizedText to my replace(originalText, ":", "-") | |
set normalizedText to my replace(normalizedText, "|", "") | |
set normalizedText to my replace(normalizedText, "{", "") | |
set normalizedText to my replace(normalizedText, "}", "") | |
set finalTitle to my firstChars(normalizedText, 30) | |
return finalTitle | |
end buildTitle | |
on replace(originalText, fromText, toText) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
## SAVED FROM: https://gist.github.com/fxsjy/5465353 | |
import BaseHTTPServer | |
from SimpleHTTPServer import SimpleHTTPRequestHandler | |
import sys | |
import base64 | |
import socket |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
DRIP="/usr/share/sounds/gnome/default/alerts/drip.ogg" | |
mpv --no-terminal $DRIP && notify-send -t 1 "TEA" "Started at: $(date +'%A, %d-%B-%y, %H:%M:%S')" --icon=dialog-information | |
declare -A ticks=( \ | |
[50]="50 sec" \ | |
[20]="1 min 10 sec" \ | |
[20]="1 min 30 sec" \ |
OlderNewer