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 re | |
import dateutil.parser | |
import sys | |
def find(pat, text, match_item): | |
match = re.findall(pat, text) | |
if match: | |
return match | |
else: | |
return False |
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/bash | |
function show_progress() { | |
echo -ne "\r" | |
echo -n "`echo "scale=5; ($count / $total)*100" | bc`" | |
} | |
path="/" | |
if [ -n "$1" ]; then |
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
//Open retainers inventory on lodestone, paste and run in browsers console (tested with Chromium). | |
$(".item-list__name").each(function(index){console.log($(".item-list__name")[index].innerText + "," + $($(".item-list__name")[index]).find(".db-tooltip__item_equipment__level")[0].innerText.replace("Lv. ","") + "," + $($(".item-list__name")[index]).find(".db-tooltip__item__level")[0].innerText.replace("Item Level ","") + "," + $($(".item-list__name")[index]).find(".db-tooltip__item_equipment__class")[0].innerText);}); |
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 java.lang.reflect.Field; | |
import java.util.Arrays; | |
import java.util.HashSet; | |
import java.util.LinkedList; | |
import java.util.List; | |
import java.util.Map; | |
public class StringifyObject { | |
private HashSet<Integer> objects = new HashSet<>(); |
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
function getExportsFromLib() { | |
readelf -W -s $1 2> /dev/null | | |
egrep "FUNC[ ]+GLOBAL[ ]+DEFAULT[ ]+[0-9]+" | | |
sed '/@@*/d;/[0-9][0-9]* _fini/d;/[0-9][0-9]* _init/d;' | | |
c++filt | | |
awk '{print substr($0, index($0,$8));}' | | |
sort | | |
uniq; | |
} |
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
#!/bin/bash | |
#Usage: xrandr_force.sh <width>x<height> | |
#Eg: ./xrander_force.sh 1920x1080 | |
#Just some random defaults | |
WIDTH=1300 | |
HEIGHT=750 | |
if [ -n "$1" ]; then |
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
#$1,2 = files containing x=y style key-values | |
#sort, awk, grep friendly | |
#Duplicate keys are not handled | |
function kvdiff() { | |
tmpfile=`mktemp` | |
OLD_IFS=$IFS; | |
IFS=$'\n' | |
declare -A left; | |
declare -A right; |