This file contains 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 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 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 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 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 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" \ |
This file contains 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 | |
# Run without args to get message headers for the last 3 days. | |
# gmail.py 10 - display message headers for the last 10 days. | |
# gmail.py 10 full - display message headers with bodies. | |
import sys | |
import os | |
import imaplib | |
import getpass |
This file contains 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
var args = { | |
quoted_prop1: " oneEE", | |
quoted_prop1aaaa: " first level another", | |
quoted_I18N__prop2: " tWo (must be under I18N)", | |
quoted_I18N__weprop2bbb: " tWo and a half (must be under I18N)", | |
quoted_API__JUJUJ__prop3: " THREE", | |
quoted_API__JUJUJ__prop3BBBB: " THREE--beeee", | |
quoted_API__JUJUJ__LAST__prop3ZZZZ: " THREE--zzzzz", | |
quoted_API__prop4: " __FOUR__", | |
quoted_prop3232aaaa: " more first level another", |
This file contains 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 | |
import os | |
import sys | |
import bottle | |
from bottle import run, static_file | |
def resolve_path(path): |
This file contains 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
# Get latest version from https://bitbucket.org/iBotPeaches/apktool/downloads | |
export APKTOOL_VERSION=2.4.0 | |
sudo -E sh -c 'wget https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_$APKTOOL_VERSION.jar -O /usr/local/bin/apktool.jar' | |
sudo chmod +r /usr/local/bin/apktool.jar | |
sudo sh -c 'wget https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool -O /usr/local/bin/apktool' | |
sudo chmod +x /usr/local/bin/apktool | |
# https://gist.github.com/bmaupin/48140926ce11fbeddec2 |
OlderNewer