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
#include <stdlib.h> | |
#include <stdio.h> | |
#include <sys/types.h> | |
#include <sys/wait.h> | |
#include <unistd.h> | |
#include <signal.h> | |
void term(int signum) | |
{ | |
printf("TERM: %d\n", getpid()); |
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
/* this implements <alt-Tab> for dwm, put it in config.h */ | |
static int alt_tab_count = 0; | |
/* focus and restack a client */ | |
static void focus_restack(Client *c) | |
{ if (c) { focus(c); restack(selmon); } } | |
static void start_alt_tab(const Arg *arg) | |
{ alt_tab_count = 0; } |
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
#!/bin/sh | |
# This goes in ~/.ssh/rc. | |
# It adds a symlink to the new $SSH_AUTH_SOCK under ~/.ssh/ssh-auth-socks/. | |
# The symlink is named after the current /dev/pts entry, so that we can find the correct link/agent to use later. | |
if [ -n "$SSH_TTY" ] && [ -n "$SSH_AUTH_SOCK" ] | |
then | |
mkdir -p $HOME/.ssh/ssh-auth-socks | |
ln -sf $SSH_AUTH_SOCK $HOME/.ssh/ssh-auth-socks/${SSH_TTY##*/} |
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 | |
# Find all nine-digit numbers whose digits are a permutation of the digits 1 to | |
# 9 and such that, taken independently: | |
# | |
# - the first digit is divisible by 1 | |
# - the first two digits are divisible by 2 | |
# - the first three digits are divisible by 3 | |
# - and so on. | |
# |
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
#compdef drive drive-google | |
local cmnd desc | |
if [[ $CURRENT == 2 ]] | |
then | |
local -a options | |
drive | | |
grep '^ [a-z]' | | |
while read cmnd desc | |
do |
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
#!/bin/sh | |
exec pantheon-terminal -e "vim $@" | |
# Save this in a file "FILENAME", then ... | |
# export TEXT_AID_TOO_EDITOR="exec sh /full/path/to/FILENAME" | |
# | |
# For example, | |
# export TEXT_AID_TOO_EDITOR="exec sh /home/blott/tmp/launch-vim-in-pantheon-terminal" |
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
#compdef insync-headless insync-portable insync | |
if [[ $CURRENT == 2 ]] | |
then | |
_values 'commands' \ | |
'accept_all_new_shares[Accept all new shares file to given account]' \ | |
'accept_share[Accept shared file to given account]' \ | |
'add_account[Add account to Insync]' \ | |
'force_sync[Force sync item]' \ | |
'get_account_information[Show information for connected acounts]' \ |