Sometimes I want to make a quick web search, and I’d prefer not to leave
Emacs. Sure, I could switch over to a different workspace and open a browser,
but I’d much rather do it in Emacs if possible. eww
will let you search
instead of enter a URL, but you only get one search engine (which is, by
default, Duck Duck Go). I’m used to the wonderful interface of Chrome, which
allows you to use a keyword to specify your search engine, right within the
“Omnibox”. Anything else feels crude. So, I decided I would implement my own
search solution!
This file contains 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
""" | |
Open a file via sudo and unix socket | |
If you only need root privileges to open one file, then you can spawn a helper | |
program with sudo to open the file, then pass the file descriptor back to your | |
original process via a Unix socket. This module imports a drop-in replacement | |
for os.open (except for the dir_fd argument) based on this idea: | |
stephen at wrath in ~/repos/opener | |
$ ls -l secret.txt |
This file contains 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
obj-m += chardev.o | |
all: | |
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules | |
clean: | |
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean |
This file contains 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
/* | |
* Sample multi-threaded application for core dump. | |
* gcc -pthread -g -O0 -o coredump coredump.c | |
*/ | |
#define _GNU_SOURCE | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <pthread.h> | |
#include <sys/types.h> | |
#include <unistd.h> |
I hereby claim:
- I am brenns10 on github.
- I am brenns10 (https://keybase.io/brenns10) on keybase.
- I have a public key ASCtEwHfvPC-c34CBjy90aiuZ7pxk9h_LRgo4cZD5MTdygo
To claim this, I am signing this object:
I hereby claim:
- I am brenns10 on github.
- I am brenns10 (https://keybase.io/brenns10) on keybase.### Keybase proof
I hereby claim:
- I am brenns10 on github.
This file contains 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
language: python | |
python: | |
- 3.5 | |
install: | |
- pip install sphinx sphinx_rtd_theme | |
script: make html | |
after_success: | |
- ./push.sh | |
env: | |
global: |
This file contains 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
From 38c48252f528b00ba0b4fd2d1a364b91c694a4ac Mon Sep 17 00:00:00 2001 | |
From: Stephen Brennan <stephen@brennan.io> | |
Date: Thu, 28 Dec 2017 15:14:59 -0800 | |
Subject: [PATCH] fs: when reading mp3 files, only play Shake It Off | |
--- | |
fs/open.c | 31 ++++++++++++++++++++++++++++++- | |
1 file changed, 30 insertions(+), 1 deletion(-) | |
diff --git a/fs/open.c b/fs/open.c |
This file contains 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
""" | |
Code to return the alphabet in which a list of words is sorted. | |
Imagine that you are given a list of words (eg: best friends forever), along | |
with the claim that these words are lexicographically sorted for *some* | |
alphabet. Your job is to determine whether this is true, and if it is, return | |
an example of such an alphabet. | |
This module implements an algorithm to solve this problem. It creates a graph | |
of dependencies between letters, performs a topological sort, and then returns |
This file contains 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
# $Id: PKGBUILD 286731 2017-01-16 12:41:55Z svenstaro $ | |
# Maintainer: Angel Velasquez <angvp@archlinux.org> | |
# Maintainer: Felix Yan <felixonmars@archlinux.org> | |
# Contributor: Stéphane Gaudreault <stephane@archlinux.org> | |
# Contributor: Allan McRae <allan@archlinux.org> | |
# Contributor: Jason Chu <jason@archlinux.org> | |
pkgname=python | |
pkgver=3.6.0 | |
pkgrel=3 |
NewerOlder