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/sh | |
#$1: Path to child directory | |
git_root_recurse_parent() { | |
# Check if cwd is a git root directory | |
if [ -d .git/objects -a -d .git/refs -a -f .git/HEAD ] ; then | |
pwd | |
return 0 | |
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
#include <memory> | |
#include <stack> | |
#include <stdexcept> | |
template <class T, class D = std::default_delete<T>> | |
class SmartObjectPool | |
{ | |
private: | |
struct ReturnToPool_Deleter { | |
explicit ReturnToPool_Deleter(std::weak_ptr<SmartObjectPool<T, D>* > pool) |
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
;;; info-mode-el -- Major mode for editing INFO files | |
;; Author: Roald Fernandez <[email protected]> | |
;; Created: 10 Nov 2014 | |
;; Keywords: INFO major-mode | |
;; Copyright (C) 2014 Roald Fernandez <[email protected]> | |
;; This program is free software; you can redistribute it and/or | |
;; modify it under the terms of the GNU General Public License as |
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 | |
if [ $# -eq 1 ] ; then | |
path=$1 | |
else | |
clipboard=$(xclip -selection clipboard -o) | |
if [ $(<<<$clipboard grep -P "^http") ] ; then | |
path=$clipboard | |
else | |
if [ -t 1 ] ; then |
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 | |
# pngopt: A wrapper for pngcrush, that makes it easier to use for overriding | |
# images with its optimized output. | |
# | |
# use: pngopt FILE1 [FILE2] [FILE3] ... | |
# | |
# If a file is optimized it outputs the filename with percentage reduction. | |
# | |
# |
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 | |
version=0.1.4 | |
versionDate="2014-09-02" | |
function showHelp() { | |
echo "subtlemark - add subtle watermarks to images | |
Usage: | |
---------------------------------------- |
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 | |
# Use this with a global hotkey to the following: gksudo [FULLPATH]/enterpass.sh | |
if [[ $EUID -ne 0 ]] ; then | |
notify-send "This script must be run as root" | |
exit | |
fi | |
if ! command -v userpass > /dev/null ; then |
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 | |
file=/home/$SUDO_USER/.local/share/userpass.list | |
function showHelp { | |
version=0.0.2 | |
versionDate="2014-06-24" | |
echo "$0 - manage passwords | |
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 | |
function showHelp { | |
version=0.0.1 | |
versionDate="2014-07-07" | |
echo "$0 - tic/toc timer pair | |
Usage: $0 [id] Stores initial time (w/optional id marker) | |
$0 [-u|--unique] Creates and returns unique id |
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 | |
version=1.0.1 | |
versionDate="2014-02-14" | |
function showHelp() { | |
echo "watchfile - monitor file(s)/command and perform action when changed | |
Possible ways of usage | |
---------------------------------------- |
NewerOlder