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
@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];
@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: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:7423949
Created November 12, 2013 01:40
Windows 2008 EMS
$ virsh console ad1
Connected to domain ad1
Escape character is ^]
SAC>?
ch Channel management commands. Use ch -? for more help.
cmd Create a Command Prompt channel.
d Dump the current kernel log.
f Toggle detailed or abbreviated tlist info.
? or help Display this list.
@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
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 / 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=
@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 / gist:9560149
Created March 15, 2014 00:52
selinux notes
Since the most likely thing I expect to trip up on tomorrow will be selinux, here are some quick notes on it for everyone else as well:
# check selinux audit log
$ sudo seaudit-report /var/log/audit/audit.log
...
Jan 14 14:46:23 (null) (null): audit(1389728783.896:402159): avc: denied { read } for pid=10210 comm=zabbix_server name=SNMPv2-MIB ino=5246 dev=dm-5 scontext=unconfined_u:system_r:zabbix_t:s0 tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=file
...
# hmmm zabbix server can't read the SNMP MIBs. What can he read?
$ sesearch --allow -R -s zabbix_t
@Supermathie
Supermathie / gist:9770293
Created March 25, 2014 20:10
Microsoft IVR
Microsoft IVR: "What would you like assistance with?"
Me: "Office Activation"
Microsoft IVR: "I'm sorry, I couldn't hear you." *Goes back to the very beginning*
...
Microsoft IVR: "What would you like assistance with?"
Me: "Penile Dysfunction"
Microsoft IVR: "OK, I'll get someone on the line."