Skip to content

Instantly share code, notes, and snippets.

@ajeddeloh
ajeddeloh / Weirdness
Last active August 29, 2015 14:07
Weird C stuff
#include <stdio.h>
static const int a;
int main(void) {
int *b = (int *) &a;
printf("%p\n%p\n", b, &a);
*b = 6;
printf("%d\n%d\n", *b, a);
}

Keybase proof

I hereby claim:

  • I am ajeddeloh on github.
  • I am andrewjeddeloh (https://keybase.io/andrewjeddeloh) on keybase.
  • I have a public key whose fingerprint is 37DE 2A50 18D4 8356 A040 1225 304B 43D7 2C6E 36D7

To claim this, I am signing this object:

@ajeddeloh
ajeddeloh / mint.com.user.js
Created October 18, 2015 18:38
Mint.com user script
// ==UserScript==
// @name Cleanup Mint
// @namespace mint
// @description cleans up shit on mint
// @include https://wwws.mint.com/*
// @version 1
// @grant none
// ==/UserScript==
console.log('Greasemonkey Start');
var Greasemonkey = function () {
Running devserver as root
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
<title>500 Internal Server Error</title>
<style type="text/css">
#powered_by {
{
"ignition": { "version": "2.0.0" },
"storage": {
"filesystems": [{
"mount": {
"device": "/dev/disk/by-label/ROOT",
"format": "ext4",
"create": {
"force": true,
"options": [ "-L","ROOT" ]
#!/usr/bin/python3
import sys
indent = 0
# characters to increase the indent
indentchars = '{['
# characters to decrease the indent
unindentchars = '}]'
# characters to cause a line break
storage:
filesystems:
- mount:
device: /dev/xvdb
format: ext4
create:
force: false
systemd:
possible timeline:
- gets dhcp lease, calls dhcp_lease_acquired
- sets mtu to 9000 (asynchronously, does not fail when the iface is up, may either claim to succeed or fail with the link down)
- calls dhcp4_update_address which then calls address_configure with dhcp4_address_handler
- address_configure builds a rtnl message to configure the link with the dhcp4_address_handler as the callback
- sends that message async
- link goes down, event generated
- link lease cleaned up
- link comes back up
- rtnl sends reply, triggers dhcp4_address_handler which calls link_set_dhcp_routes
/etc/warnquota.conf
/etc/ssh/moduli
/etc/X11/xinit/xinitrc.d/50-systemd-user.sh
/etc/audit/rules.d/audit.rules
/etc/systemd/coredump.conf
/etc/dbus-1/session.d/.keep_sys-apps_dbus-0
/etc/audit/auditd.conf
/etc/udev/udev.conf
/etc/sestatus.conf
/etc/kernel/postinst.d/90_kexec
(from install phase)
ecompressdir: bzip2 -9 /usr/share/man
Traceback (most recent call last):
File "/usr/lib64/python3.5/site-packages/portage/dbapi/_MergeProcess.py", line 235, in _spawn
prev_mtimes=self.prev_mtimes, counter=counter)
File "/usr/lib64/python3.5/site-packages/portage/dbapi/vartree.py", line 1666, in wrapper
return f(self, *args, **kwargs)
File "/usr/lib64/python3.5/site-packages/portage/dbapi/vartree.py", line 5112, in merge
counter=counter)
File "/usr/lib64/python3.5/site-packages/portage/dbapi/vartree.py", line 3927, in treewalk