Skip to content

Instantly share code, notes, and snippets.

Anthony Oliver xamox

Block or report user

Report or block xamox

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@xamox
xamox / arch-linux-install.md
Last active Sep 5, 2018 — forked from mattiaslundberg/arch-linux-install
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
View arch-linux-install.md
@sckalath
sckalath / linux_privesc
Last active Nov 17, 2019
Linux Privilege Escalation Techniques
View linux_privesc
// Determine linux distribution and version
cat /etc/issue
cat /etc/*-release
cat /etc/lsb-release
cat /etc/redhat-release
// Determine kernel version - 32 or 64-bit?
cat /proc/version
uname -a
uname -mrs
@mattiaslundberg
mattiaslundberg / arch-linux-install
Last active Dec 10, 2019
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
View arch-linux-install
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swedish keymap
@rantav
rantav / README.md
Created Aug 23, 2012
Find slow queries in mongo DB
View README.md

A few show tricks to find slow queries in mongodb

Enable profiling

First, you have to enable profiling

> db.setProfilingLevel(1)

Now let it run for a while. It collects the slow queries ( > 100ms) into a capped collections, so queries go in and if it's full, old queries go out, so don't be surprised that it's a moving target...

@xamox
xamox / AutoVivifaction.py
Created Nov 10, 2011
This is useful for setting nested dictionaries and setting items like objects
View AutoVivifaction.py
class AutoVivification(dict):
"""
Implementation of perl's autovivification feature.
>>> a = AutoVivification()
>>> a[1][2][3] = 4
>>> a[1][3][3] = 5
>>> a[1][2]['test'] = 6
>>> print a
>>> {1: {2: {'test': 6, 3: 4}, 3: {3: 5}}}
You can’t perform that action at this time.