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
//Note: quickly hacked together and only tested on one file | |
string xml = File.ReadAllText(@"sample.xfdf", Encoding.UTF8); | |
XDocument doc = XDocument.Load(new StringReader(xml)); | |
var elements = doc.Root.Element(XName.Get("annots", "http://ns.adobe.com/xfdf/")) | |
.Elements(XName.Get("highlight", "http://ns.adobe.com/xfdf/")) | |
.OrderBy(e => int.Parse(e.Attribute("page").Value)); | |
StringBuilder builder = new StringBuilder(); | |
foreach (XElement element in elements) | |
{ var highlightText = element.Descendants(XName.Get("span", "http://www.w3.org/1999/xhtml")).FirstOrDefault()?.Value; |
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() { | |
var ul_array = document.getElementsByClassName('subreddits').item(0).children; | |
var multiString = "http://reddit.com/r/"; | |
for (var i = 0; i < ul_array.length; i++) { | |
var subName = ul_array[i].firstChild.firstChild.data.slice(3); | |
multiString += subName + "+" | |
} | |
window.prompt('Copy this string and send it to your phone. \n\nIn Alien Blue: \n\nTap "Edit" \nTap the "+" button next to the group you want the multi to be in. \nPaste the string into the "/r/" box. \nTap "Done"', multiString); | |
})() |
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
#REQUIRED: set the directory you want to compress. | |
$dirToArchive = "C:\path\to\dir\" | |
#leave blank in order to automatically use directory name as archive name, otherwise enter the filename of the archive to create | |
$archiveName = "" | |
#$archiveName = "Data.7z" | |
#path to 7z.exe | |
$exec = "C:\Program Files\7-Zip\7z.exe" |
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
/* Close Current Tree: Closes Current tabs and all descendants */ | |
selTab = gBrowser.selectedTab; | |
TreeStyleTabService.getDescendantTabs(selTab).forEach(function(tab) { | |
try | |
{ | |
gBrowser.removeTab(tab); | |
} | |
catch(e) | |
{ | |
console.log("Failed to remove" + tab.label) |