Skip to content

Instantly share code, notes, and snippets.

💭
Life

Efreak Efreak

💭
Life
Block or report user

Report or block Efreak

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View findempty.cmd
@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"
)
View zip.cmd
@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 Nov 25, 2016
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
View startwsl.vbs
'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)
View wild-cherry.zsh-theme
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
View Styles for Seraph Inn's Inverloch.user.js
// ==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==
View download steam account tables.js
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) {
View steam sort tables.js
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 Mar 22, 2016
CHIP & NextThingCo logos. Edited from sources on their website (rainbowchiplogo.svg) and GitHub (SingleHeader.svg)
View chiplogo+text.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Efreak
Efreak / GitLab_Logo.svg
Created Mar 13, 2016
The official gitlab logo is several shapes; in order to rasterize it without odd outlines and without finding some program other than inkscape, I had to make it layered instead.
View GitLab_Logo.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View google.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.