Skip to content

Instantly share code, notes, and snippets.

View Supermathie's full-sized avatar
🏠
Working from home, before it was cool

Michael Brown Supermathie

🏠
Working from home, before it was cool
View GitHub Profile
var pattern = /(MOBI|EPUB|PDF|CBZ|PDF \(HQ\))$/i;
var out = "";
var nodes = document.getElementsByTagName('a');
for (i in nodes) {
var a = nodes[i];
if (a && a.text && pattern.test(a.text.trim())) {
out += a.attributes['data-web'].value;
out += "\n";
}
}
@Supermathie
Supermathie / 50fix
Created February 7, 2017 16:32
fix apt
# /etc/apt/apt.conf.d/50fix_apt
APT {
Install-Recommends "false";
Install-Suggests "false"; AutoRemove {
SuggestsImportant "false"; RecommendsImportant "false";
}
}
@Supermathie
Supermathie / gist:7996969
Created December 16, 2013 23:34
bug 1043693
Description of problem:
A specific customer workload is causing abnormally high system load on RHEL6, whereas the code did not cause the same under RHEL4. The abnormal load relates to the dnotify / inotify subsystems.
Version-Release number of selected component (if applicable):
Tests run on 2.6.32-279.2.1.el6.x86_64
How reproducible:
100%
Steps to Reproduce:
@Supermathie
Supermathie / sample 1
Last active December 30, 2015 18:19
raw test data
<html><head></head><body data-blackberry-caret-color=3D"#00a8df" style=3D"b=
ackground-color: rgb(255, 255, 255); line-height: initial;"><div id=3D"BB10=
_response_div" style=3D"width: 100%; font-size: initial; font-family: Calib=
ri, 'Slate Pro', sans-serif; color: rgb(31, 73, 125); text-align: initial; =
background-color: rgb(255, 255, 255);">Let's remember that the information =
in the article was filtered through no less than two people who don't fully=
speak tech. I think I can translate it back:</div> =
=
<div id=3D"response_div_spacer" style=3D"=
width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-se=
Cumulative Security Update for ActiveX Killbits for Windows Server 2008 R2 x64 Edition (KB2900986)
Cumulative Security Update for Internet Explorer 10 for Windows Server 2008 R2 Service Pack 1 for x64-based Systems (KB2888505)
Microsoft .NET Framework 4.5.1 for Windows Server 2008 R2 x64-based Systems (KB2858725)
Security Update for Windows Server 2008 R2 x64 Edition (KB2647170)
Security Update for Windows Server 2008 R2 x64 Edition (KB2772930)
Security Update for Windows Server 2008 R2 x64 Edition (KB2853587)
Security Update for Windows Server 2008 R2 x64 Edition (KB2862152)
Security Update for Windows Server 2008 R2 x64 Edition (KB2868626)
Security Update for Windows Server 2008 R2 x64 Edition (KB2868725)
Security Update for Windows Server 2008 R2 x64 Edition (KB2875783)
@Supermathie
Supermathie / gist:7456603
Created November 13, 2013 21:20
combining accents
decimal hex chr name
------- ----- --- ----------------------------------------
768 300 ̀ Combining Grave Accent
769 301 ́ Combining Acute Accent
770 302 ̂ Combining Circumflex Accent
771 303 ̃ Combining Tilde
772 304 ̄ Combining Macron
773 305 ̅ Combining Overline
774 306 ̆ Combining Breve
775 307 ̇ Combining Dot Above
@Supermathie
Supermathie / gist:7321610
Created November 5, 2013 16:20
domain join error
# samba-tool domain join ad.netdirect.ca DC -Uadministrator --realm=ad.netdirect.ca -W AD
Finding a writeable DC for domain 'ad.netdirect.ca'
Found DC AD1.ad.netdirect.ca
Password for [AD\administrator]:
workgroup is AD
realm is ad.netdirect.ca
checking sAMAccountName
Adding CN=SAMBA1,OU=Domain Controllers,DC=ad,DC=netdirect,DC=ca
Adding CN=SAMBA1,CN=Servers,CN=Lab,CN=Sites,CN=Configuration,DC=ad,DC=netdirect,DC=ca
Adding CN=NTDS Settings,CN=SAMBA1,CN=Servers,CN=Lab,CN=Sites,CN=Configuration,DC=ad,DC=netdirect,DC=ca
@Supermathie
Supermathie / gist:7148885
Last active December 26, 2015 12:09
Printer WOES
Upgrading the firmware to H.08.67
From HP's site:
http://h20565.www2.hp.com/portal/site/hpsc/template.PAGE/public/kb/docDisplay/?sp4ts.oid=27316&spf_p.tpst=kbDocDisplay&spf_p.prp_kbDocDisplay=wsrp-navigationalState%3DdocId%253Demr_na-bpj07129-4%257CdocLocale%253Den_US%257CcalledBy%253D&javax.portlet.begCacheTok=com.vignette.cachetoken&javax.portlet.endCacheTok=com.vignette.cachetoken
1. Type: ftp HP_Jetdirect_IP_address
2. At the prompt for a user name/account, press Enter . (The HP Jetdirect print server will accept all passwords or blanks for the username, so in most cases just press Enter).
3. At the Password prompt, press Enter . (The HP Jetdirect print server will accept all passwords or blanks for the password, so in most cases just press Enter. However, If Telnet is enabled and an administrator password is set, the administrator password must be entered at the password prompt).
4. At the ftp prompt, type: bin
5. Type hash
@Supermathie
Supermathie / gist:5389349
Created April 15, 2013 16:28
xdr_opaque glibc source (RHEl6)
/*
* XDR opaque data
* Allows the specification of a fixed size sequence of opaque bytes.
* cp points to the opaque object and cnt gives the byte length.
*/
bool_t
xdr_opaque (XDR *xdrs, caddr_t cp, u_int cnt)
{
u_int rndup;
static char crud[BYTES_PER_XDR_UNIT];
@@ -1,48 +1,49 @@
-ECDHE-RSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH Au=RSA Enc=AESGCM(128) Mac=AEAD
-ECDHE-ECDSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH Au=ECDSA Enc=AESGCM(128) Mac=AEAD
ECDHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH Au=RSA Enc=AESGCM(256) Mac=AEAD
ECDHE-ECDSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH Au=ECDSA Enc=AESGCM(256) Mac=AEAD
-DHE-RSA-AES128-GCM-SHA256 TLSv1.2 Kx=DH Au=RSA Enc=AESGCM(128) Mac=AEAD
-DHE-DSS-AES128-GCM-SHA256 TLSv1.2 Kx=DH Au=DSS Enc=AESGCM(128) Mac=AEAD
-DHE-DSS-AES256-GCM-SHA384 TLSv1.2 Kx=DH Au=DSS Enc=AESGCM(256) Mac=AEAD
-DHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=DH Au=RSA Enc=AESGCM(256) Mac=AEAD
-ECDHE-RSA-AES128-SHA256 TLSv1.2 Kx=ECDH Au=RSA Enc=AES(128) Mac=SHA256