Skip to content

Instantly share code, notes, and snippets.

View englishextra's full-sized avatar
💜
the beat goes on

englishextra englishextra

💜
the beat goes on
View GitHub Profile
@englishextra
englishextra / .electron-packager.bat
Created August 2, 2016 17:32
electron-packager compile .bat script
:: gist.github.com/englishextra/ae0e0637deaae9700dec6aa3b3cdafe0
:: github.com/electron-userland/electron-packager/blob/0421e9803c0a5cb3a1d38e4a9660e464a6a5a20d/usage.txt
:: --platform=darwin --arch=ia32 - depricated? github.com/electron-userland/electron-packager/blob/master/NEWS.md
:: electron-packager ./www englishextra-app --out=./.dist --ignore="(\/fonts\/englishextra-ui-icons-fontfacekit\/demo\.css|\/fonts\/englishextra-ui-icons-fontfacekit\/fontface\.css|\/fonts\/englishextra-ui-icons-fontfacekit\/demo\.html|\/fonts\/englishextra-ui-icons-fontfacekit\/demo\.js|\/libs\/koala-config\.json|\/libs\/englishextra-ui\/css\/bundle\.css|\/libs\/englishextra-ui\/js\/bundle\.js|\/libs\/contents\/css\/bundle\.css|\/libs\/contents\/img\/contents-banner-aids-640x336\.svg|\/libs\/contents\/img\/contents-banner-articles-640x336\.svg|\/libs\/contents\/img\/contents-banner-cup-640x336\.svg|\/libs\/contents\/img\/contents-banner-ege-640x336\.svg|\/libs\/contents\/img\/contents-banner-gg-640x336\.svg|\/libs\/contents\/im
@englishextra
englishextra / rss2.xsl
Last active July 29, 2016 21:36
RSS 2 pubDate human readable formatting with XSLT
<?xml version="1.0" encoding="UTF-8"?>
<!-- modified github.com/dotclear/dotclear/blob/master/inc/public/default-templates/legacy/rss2.xsl -->
<!-- gist.github.com/englishextra/acf31f209d0875c59b1c8fd532e25b87 -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="1.0">
<xsl:output method="html" />
<xsl:template match="/">
<html>
<head>
<title>
<xsl:value-of select="/rss/channel/title" />
@englishextra
englishextra / gdipp_setting.xml
Last active July 24, 2016 11:40
GDIPP settings sample
<?xml version="1.0" encoding="UTF-8" ?>
<!-- https://gist.github.com/englishextra/dc6763ed8322a90ce19b4aa775d819f9 -->
<gdipp>
<version>0.9.1</version>
<gdimm>
<process>
<freetype>
<cache_max_faces>8</cache_max_faces>
<cache_max_sizes>16</cache_max_sizes>
@englishextra
englishextra / openDeviceBrowser.js
Last active May 12, 2017 20:15
Open external links in default browser out of Electron / nwjs
/*!
* Open external links in default browser out of Electron / nwjs
* gist.github.com/englishextra/b9a8140e1c1b8aa01772375aeacbf49b
* stackoverflow.com/questions/32402327/how-can-i-force-external-links-from-browser-window-to-open-in-a-default-browser
* github.com/nwjs/nw.js/wiki/shell
* electron - file: | nwjs - chrome-extension: | http: Intel XDK
* wont do in electron and nw,
* so manageExternalLinks will set target blank to links
* var win = w.open(url, "_blank");
* win.focus();
@englishextra
englishextra / revealWindowModule.js
Created July 3, 2016 08:58
Temporal reveal of module
/*!
* Temporal reveal of module
* github.com/electron/electron/pull/3497
* gist.github.com/englishextra/1bf72395f77c8cf25ddd900aa69a0d68
*/
var revealWindowModule=function(){window.module&&(module=window.module);};
@englishextra
englishextra / hideWindowModule.js
Last active July 3, 2016 08:59
Temporal hiding of module
/*!
* Temporal hiding of module
* github.com/electron/electron/pull/3497
* gist.github.com/englishextra/1bf72395f77c8cf25ddd900aa69a0d68
*/
var hideWindowModule=function(){"object"===typeof module&&(window.module=module,module=void 0);};
@englishextra
englishextra / prependFragmentBefore.js
Last active October 1, 2016 19:55
Adds Element BEFORE NeighborElement
/*!
* Adds Element as fragment BEFORE NeighborElement
* gist.github.com/englishextra/fa19e39ce84982b17fc76485db9d1bea
* @param {String|object} e HTML Element to prepend before before
* @param {Object} a target HTML Element
* prependFragmentBefore(e,a)
*/
var prependFragmentBefore=function(e,a){"string"===typeof e&&(e=document.createTextNode(e));var p=a.parentNode||"",df=document.createDocumentFragment();p&&df.appendChild(e)&&p.insertBefore(df,a);return!1;};
@englishextra
englishextra / irrverbsscr-win32-ia32.aip
Last active June 17, 2016 11:43
irrverbsscr-win32-ia32.aip
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<DOCUMENT Type="Advanced Installer" CreateVersion="12.8" version="12.8" Modules="enterprise" RootPath="." Language="en" Id="{70C9B116-2517-4F28-AAC7-87C552879636}">
<COMPONENT cid="caphyon.advinst.msicomp.ProjectOptionsComponent">
<ROW Name="HiddenItems" Value="SccmComponent;ActSyncAppComponent"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiPropsComponent">
<ROW Property="AI_BITMAP_DISPLAY_MODE" Value="0"/>
<ROW Property="ALLUSERS" Value="1"/>
<ROW Property="ARPCOMMENTS" Value="https://gist.github.com/englishextra/64c6c44acc73b64ba5a276bead011c18" ValueLocId="*"/>
<ROW Property="ARPHELPLINK" Value="https://irrverbsscr.codeplex.com/documentation"/>
@englishextra
englishextra / irrverbsscr-win32-ia32.nsi
Created June 17, 2016 11:38
irrverbsscr-win32-ia32.nsi
;https://gist.github.com/englishextra/70e4b8e70ae971a0af3ba92c1dddc611
; Script generated by the ISS2NSI program.
; Generated from: D:\server\sources\englishextra-app\englishextra-app-win32-ia32.iss
;change INNO's {pf32} to NSIS's $PROGRAMFILES32
;change INNO's {pf64} to NSIS's $PROGRAMFILES64
; fix englishextra-app\./.dist\ to englishextra-app\.dist\
; change Unins000.exe to uninstall.exe
;1 warning:
;!warning: MUI_LANGUAGE should be inserted after the MUI_[UN]PAGE_* macros (macro:MUI_LANGUAGE:8)
@englishextra
englishextra / loadCSS.js
Last active October 1, 2016 20:00
load CSS async
/*!
* load CSS async
* modified order of arguments, added callback option, removed CommonJS stuff
* github.com/filamentgroup/loadCSS
* gist.github.com/englishextra/50592e9944bd2edc46fe5a82adec3396
* @param {String} _href path string
* @param {Object} callback callback function
* @param {String} media media attribute string value
* @param {Object} [before] target HTML element
* loadCSS(_href,callback,media,before)