Skip to content

Instantly share code, notes, and snippets.

View Efreak's full-sized avatar
😴
😪😴🥱😌💤

Efreak Efreak

😴
😪😴🥱😌💤
View GitHub Profile
@Efreak
Efreak / README.md
Last active January 5, 2017 20:21
Signed shumway addon for firefox

This is my copy of shumway, signed by mozilla on August 5 2016

It's possible that firefox in the future (or currently) expires signatures on self-hosted addons and will want a newly signed version of the addon--I will not be providing this, as I no longer use it, and I had the mozilla tools installed in a throwaway virtual environment. This impression mostly comes from this post on mozilla support.

If you don't trust my source, you should be able to unzip the xpi file and compare the contents to the official version (this may require building it yourself, I'm not sure).

I have no idea why my xpi is 66mb and http://mozilla.github.io/shumway/extension/firefox/shumway.xpi is only 558kb.

@echo off
echo "Removing empty subdirectories"
timeout /t 10
cls
for /d /r %1 %%A in (.) do (
dir /a /b "%%~fA" 2>nul | findstr "^" >nul || rmdir "%%~fA"
)
@echo off
echo "Zipping subfolders of subfolders into uncompressed cbz files. 7z.exe should be in path, current, or parent directory"
timeout /t 10
path=C:\Program Files\7-Zip\;..;%PATH%
cls
setlocal
for /d %%a in (*) DO (
cd "%%a"
for /d %%x in ("*") DO (
7z.exe a -tzip -mx0 "%%x.cbz" "%%x\"
@Efreak
Efreak / startwsl.vbs
Created November 25, 2016 20:40
Start persistent WSL with services and byobu in background. To launch byobu with wsltty, use the command in wsl.bat, and replace /bin/bash with /usr/bin/byobu. Raw
'syntax
' - Run: http://ss64.com/vb/run.html or https://msdn.microsoft.com/en-us/library/d5fk67ky(v=vs.84).aspx
' - Sleep: http://ss64.com/vb/sleep.html or https://msdn.microsoft.com/en-us/library/6t81adfd(v=vs.84).aspx
'start hidden byobu in WSL. If you like playing with zsh modules so much that your prompt frequently takes a long time to load, you'll want this.
CreateObject ("Wscript.Shell").Run "C:\Windows\System32\bash.exe -c byobu", 0, false
'give it a bit to finish starting. https://msdn.microsoft.com/en-us/library/6t81adfd(v=vs.84).aspx
WScript.Sleep(3000)
@Efreak
Efreak / wild-cherry.zsh-theme
Created November 20, 2016 02:19
wild-cherry
VIRTUAL_ENV_DISABLE_PROMPT=true
# PROMPT
if [ ! -n "${WILDCHERRY_PROMPT_CHAR+1}" ]; then
WILDCHERRY_PROMPT_CHAR="\$"
fi
if [ ! -n "${WILDCHERRY_PROMPT_ROOT+1}" ]; then
WILDCHERRY_PROMPT_ROOT=true
fi
// ==UserScript==
// @name Styles for Seraph Inn's Inverloch
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Compress the header. Center the comic, make it bigger (zoom main content, zoom comic a little more- this may cause graphical issues). Hide the copyright (we all know who made it) but not the ads (use an ad blocker if you care. Project Wonderful is OK).
// @author Efreak
// @match http://inverloch.seraph-inn.com/viewcomic.php?*
// @grant none
// ==/UserScript==
var table = jQuery(".account_table").length ? "account_table" : "wallet_history_table"
jQuery('.wht_total > .wth_payment').remove()
c=jQuery('td');for(i=0;i<c.length;i++){c[i].innerHTML=c[i].innerText}
((function () {
var uri = 'data:application/vnd.ms-excel;base64,'
, template = '<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--></head><body><table>{table}</table></body></html>'
, base64 = function (s) { return window.btoa(unescape(encodeURIComponent(s))) }
, format = function (s, c) { return s.replace(/{(\w+)}/g, function (m, p) { return c[p]; }) }
return function (table, name, filename) {
c=jQuery('td');
for(i=0;i<c.length;i++){
c[i].innerHTML=c[i].innerText
}
function sec(e){if(window.getSelection&&document.createRange){var t=window.getSelection(),n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}else if(document.selection&&document.body.createTextRange){var o=document.body.createTextRange();o.moveToElementText(e),o.select()}}
if(jQuery(".account_table").length) {
sec(jQuery(".account_table")[0]);
@Efreak
Efreak / chiplogo+text.svg
Created March 22, 2016 00:13
CHIP & NextThingCo logos. Edited from sources on their website (rainbowchiplogo.svg) and GitHub (SingleHeader.svg)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.