Skip to content

Instantly share code, notes, and snippets.

View major's full-sized avatar
🤠
Yeehaw.

Major Hayden major

🤠
Yeehaw.
View GitHub Profile
@major
major / user_agents.txt
Last active August 29, 2015 14:02
Top user agents hitting icanhazip.com
4789794 curl
3945477 Python-urllib
1331837 Wget
1013183 - <-- no user agent string provided
424091 Mozilla
225741 Dalvik
74061 myBookAlarm
69084 Apache-HttpClient
51438 python-requests
37270 Go
@major
major / gist:4ab2e568cb232262b9a1
Created June 29, 2014 19:23
ipxe under xen is giving me grey hairs
root (hd0)
Filesystem type is ext2fs, using whole disk
kernel /boot/ipxe.lkrn dhcp && chain http://boot.rackspace.com/menu.ipxe
xc: error: panic: xc_dom_bzimageloader.c:644: xc_dom_probe_bzimage_kernel: boot protocol too old (0207): Invalid kernel
xc: error: panic: xc_dom_core.c:585: xc_dom_find_loader: no loader found: Invalid kernel
xc_dom_parse_image returned -1
close(3)
Error 9: Unknown boot failure
@major
major / playbook.yml
Last active August 29, 2015 14:04
Ansible yum benchmarking
---
- hosts: chroot
vars:
- packages_to_install:
- bzip2
- chrony
- git
- less
- libselinux-utils
- lldpad
@major
major / gist:d4e9f447ab942edd7952
Created July 28, 2014 13:51
CentOS 7 / Fedora LiveOS issues when live disk fills
to cause the problem:
dd if=/dev/zero of=/testfile.bin bs=1M count=2048
system journal:
[ 2214.964214] device-mapper: snapshots: Invalidating snapshot: Unable to allocate exception.
[ 2214.971235] Buffer I/O error on device dm-0, logical block 1783562
[ 2214.971244] Buffer I/O error on device dm-0, logical block 1783095
[ 2214.971247] EXT4-fs warning (device dm-0): ext4_end_bio:287: I/O error writing to inode 16 (offset 198406144 size 4096 starting block 1783095)
@major
major / gist:b57dc7189d34f1253ea4
Last active August 29, 2015 14:04
libvirtd/apparmor on debian jessie
root@testing:~# libvirtd --verbose
2014-07-29 15:09:00.480+0000: 18967: info : libvirt version: 1.2.4
2014-07-29 15:09:00.480+0000: 18967: error : virSecurityDriverLookup:80 : unsupported configuration: Security driver apparmor not enabled
2014-07-29 15:09:00.480+0000: 18967: error : qemuSecurityInit:393 : Failed to initialize security drivers
2014-07-29 15:09:00.480+0000: 18967: error : virStateInitialize:749 : Initialization of QEMU state driver failed: unsupported configuration: Security driver apparmor not enabled
2014-07-29 15:09:00.480+0000: 18967: error : daemonRunStateInit:922 : Driver state initialization failed
root@testing:~# grep security_driver /etc/libvirt/qemu.conf
# security_driver = [ "selinux", "apparmor" ]
# value of security_driver cannot contain "dac". The value "none" is
# a special value; security_driver can be set to that value in
security_driver = "apparmor"
root@testing:~# aa-status
AppArmor available in kernel.
28 profiles are loaded.
5 profiles are in enforce mode.
/usr/lib/chromium-browser/chromium-browser//browser_java
@major
major / gist:d574eaf0dbb913afda15
Created July 31, 2014 21:13
btrfs compression fun
[root@localhost ~]# ls -al /lolfile*
-rw-r--r--. 1 root root 1073741824 Jul 31 21:11 /lolfile10.bin
-rw-r--r--. 1 root root 1073741824 Jul 31 21:11 /lolfile11.bin
-rw-r--r--. 1 root root 1073741824 Jul 31 21:11 /lolfile12.bin
-rw-r--r--. 1 root root 1073741824 Jul 31 21:11 /lolfile13.bin
-rw-r--r--. 1 root root 1073741824 Jul 31 21:11 /lolfile14.bin
-rw-r--r--. 1 root root 1073741824 Jul 31 21:11 /lolfile15.bin
-rw-r--r--. 1 root root 1073741824 Jul 31 21:11 /lolfile16.bin
-rw-r--r--. 1 root root 1073741824 Jul 31 21:11 /lolfile17.bin
-rw-r--r--. 1 root root 1073741824 Jul 31 21:11 /lolfile18.bin
@major
major / gist:7da2ad1ebe2e961097b2
Last active August 29, 2015 14:04
systemd-udevd persistent network device naming
[root@localhost ~]# ip addr | grep mtu
2: enp8s0f0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
3: enp8s0f1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
4: enp1s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
5: enp1s0f1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
6: enp66s0f0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
7: enp66s0f1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
[root@localhost ~]# lspci | grep -i Ethernet
01:00.0 Ethernet controller: Intel Corporation Ethernet Controller 10-Gigabit X540-AT2 (rev 01)
@major
major / -
Last active August 29, 2015 14:05
Existing equivalent SELinux directories on Fedora 20
SELinux Distribution fcontext Equivalence
/usr/local/lib64 = /usr/lib
/etc/systemd/system = /usr/lib/systemd/system
/run/systemd/system = /usr/lib/systemd/system
/run/systemd/generator = /usr/lib/systemd/system
/etc/init.d = /etc/rc.d/init.d
/var/roothome = /root
/usr/lib64 = /usr/lib
/var/lib/xguest/home = /home
@major
major / gist:4bdc04220984b9d9707c
Last active August 29, 2015 14:05
Lenovo X1 Carbon Ultrabook for sale!
I have a Lenovo ThinkPad X1 Carbon 3443CTO for sale. The laptop is in great shape.
I have extra power adapters that I'll throw in as well. Here are the specs:
* i7-3667U (3.2GHz, 2 cores, 4 threads)
- Intel ARK link: http://intel.ly/1ptfmH2
* 8GB RAM
* 256GB SSD
* 1600x900 14" HD+ display
* USB 3.0/2.0
* Media card slot