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
#include <stdlib.h> | |
#include <stdio.h> | |
#include <errno.h> | |
int main() { | |
int c, i; | |
i = 0; | |
char buffer[256]; | |
FILE *file; |
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
/** | |
* almond 0.2.3 Copyright (c) 2011-2012, The Dojo Foundation All Rights Reserved. | |
* Available via the MIT or new BSD license. | |
* see: http://github.com/jrburke/almond for details | |
*/ | |
//Going sloppy to avoid 'use strict' string cost, but strict practices should | |
//be followed. | |
/*jslint sloppy: true */ | |
/*global setTimeout: false */ |
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
#!/bin/bash | |
git filter-branch -f --env-filter \ | |
"if [ \$GIT_COMMIT = ${1} ] | |
then | |
export GIT_AUTHOR_DATE=\"${2}\" | |
export GIT_COMMITTER_DATE=\"${2}\" | |
fi" |
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
#!/bin/bash | |
set -e | |
NAME=$(basename ${0}) | |
USAGE="Usage: ${NAME} source target [prefix]" | |
function error { | |
echo "${NAME}: ${1:-'Unknown Error'}" 1>&2 | |
echo ${USAGE} 1>&2 |
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
ENV{ID_FS_LABEL_ENC}=="?*", ACTION=="add", SUBSYSTEMS=="usb", \ | |
ATTRS{idVendor}=="1058", ATTRS{idProduct}=="0a78", \ | |
RUN+="/home/username/bin/sync-backup-drive-wrapper.sh %k" |
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
function pass { | |
# If no arguments are passed we just call `pwsafe`. This is useful when we | |
# want to list all available passwords by typing `pass`. | |
if [ "${#}" -lt 1 ]; then | |
pwsafe | |
return | |
fi | |
pwsafe -qp ${*} | perl -ne 'chomp and print' | xclip -sel clip | |
} |
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
#!/bin/bash | |
# Find the absolute path of the script. | |
# See http://stackoverflow.com/a/246128/659910. | |
DIR="$( cd "$( dirname "$0" )" && pwd )" | |
# This script is called by `udev` and needs to complete quickly, so we | |
# background another script. `${1}` contains the device name. | |
nohup "${DIR}/sync-backup-drive.sh" ${1} >/dev/null 2>&1 & |
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
#!/bin/bash | |
drive_name="${1}" | |
if [ -z "${drive_name}" ]; then | |
exit 1 | |
fi | |
USERNAME='username' | |
SOURCE_DIR="/home/${USERNAME}/Backup" |
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
#!/bin/bash | |
DRIVE_NAME=${1:-Backup} | |
if [ -z "${DRIVE_NAME}" ]; then | |
echo 'No drive found.' 1>&2 | |
exit 1 | |
fi | |
drive_dir="$(mount -l | grep "\[${DRIVE_NAME}\]" | awk '{print $1}')" |
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
_MOTIF_WM_HINTS = 0x2, 0x0, 0x80, 0x0, 0x0 | |
_NET_WM_ICON_GEOMETRY = 0, 153, 48, 48 | |
_NET_WM_DESKTOP_FILE = "/usr/share/applications/gnome-terminal.desktop" | |
_COMPIZ_WM_WINDOW_BLUR_DECOR = 4, 0, 5, 4, -28, 6, -4, -27, 5, 2, -27, 6, -2, -26, 5, 1, -26, 6, -1, -25, 5, 0, -25, 6, 0, -23, 5, -1, -23, 6, 1, 0, 9, -1, 0, 10, 1, 1, 5, -1, 0, 9, 0, 0, 6, 0, 0, 10, 1, 0 | |
_UBUNTU_APPMENU_OBJECT_PATH = "/com/canonical/menu/3C00006" | |
_UBUNTU_APPMENU_UNIQUE_NAME = ":1.86" | |
XKLAVIER_STATE = 0, 0 | |
WM_STATE: | |
window state: Normal | |
icon window: 0x0 |
OlderNewer