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: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: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 / 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";
}
}
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 / gist:1fe384a61280abbdf3ced26fac695675
Created June 1, 2017 16:04
ISC DHCP PXE architecture switching example
option arch code 93 = unsigned integer 16;
if substring(option vendor-class-identifier, 0, 9) = "PXEClient" {
if option arch = 00:02 { # IA64 EFI boot
filename "/NoopApp.efi"; # not the right image, but we don't care
} else if option arch = 00:06 { # x86 EFI boot
filename "/NoopApp.efi"; # not the right image, but we don't care
} else if option arch = 00:07 { # BC (bytecode) EFI boot
filename "/live-efi/elilo.efi";
} else if option arch = 00:09 { # x64 EFI boot
filename "/live-efi/elilo.efi";
@Supermathie
Supermathie / check_taint.py
Created January 8, 2018 22:42
linux: check taint
with open('/proc/sys/kernel/tainted') as f:
# I'm sure there's a better way to write this, but this is too awesome to not use :D
taint_bits = map(lambda x: x[0], filter(lambda x: x[1] == 1, zip(range(1024),map(int,(reversed(bin(int(f.read()))[2:]))))))
for taint_bit in taint_bits:
if taint_bit == 0: # 'P' - Proprietary module has been loaded.
pass
elif taint_bit == 1: # 'F' - Module has been forcibly loaded.
pass
elif taint_bit == 2: # 'S' - SMP with CPUs not designed for SMP.
pass
○ → host forum.audulus.com 8.8.8.8
Using domain server:
Name: 8.8.8.8
Address: 8.8.8.8#53
Aliases:
forum.audulus.com has address 208.113.169.12
forum.audulus.com is an alias for audulus1.hosted-by-discourse.com.
audulus1.hosted-by-discourse.com has IPv6 address 2001:470:1:669::87
forum.audulus.com is an alias for audulus1.hosted-by-discourse.com.