This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Close git-bugs based on meta-data from commit messages in a repository. | |
""" | |
import argparse | |
import logging | |
import os | |
import subprocess | |
import sys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2019 Josh Bialkowski <[email protected]> | |
#include <fcntl.h> | |
#include <ifaddrs.h> | |
#include <net/if.h> | |
#include <netinet/in.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/ioctl.h> | |
#include <sys/socket.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Toggles headset connection | |
from __future__ import print_function | |
from __future__ import unicode_literals | |
# Original solution found here: | |
# https://askubuntu.com/questions/48001 | |
# /connect-to-bluetooth-device-from-command-line |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BitMember(object): | |
def __init__(self, size, offset=0): | |
self.size = size | |
self.offset = offset | |
@property | |
def mask(self): | |
return ~((~0) << (self.offset + self.size)) & ((~0) << self.offset) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
""" | |
Resolve phandle references from a device tree capture. | |
""" | |
import argparse | |
import logging | |
import sys | |
def get_phandle_map(infile): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
"""Command line control of images in your clipboard.""" | |
import argparse | |
import os | |
import sys | |
import gi | |
gi.require_version('Gtk', '3.0') | |
from gi.repository import Gtk, Gdk, GdkPixbuf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// g++ -o user_chroot user_chroot.cc | |
// references: | |
// [1]: http://man7.org/linux/man-pages/man7/user_namespaces.7.html | |
// [2]: http://man7.org/linux/man-pages/man2/unshare.2.html | |
#include <sched.h> | |
#include <sys/types.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> |