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
function _bak_help | |
echo "Usage: bak|unbak <file/dir> [suffix]" | |
echo " bak: Copy <file/dir> to <file/dir><suffix> (default: .bak)" | |
echo " unbak: Copy <file/dir><suffix> to <file/dir> (default: .bak)" | |
end | |
function bak | |
if test "$argv[1]" = "-h" | |
_bak_help | |
return |
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 bash | |
# Hides all unhidden tesktop icons, or if they are all hidden already, | |
# unhides all (excluding dot prefixed). | |
# | |
# Bind me to a global hotkey. | |
# | |
# This method allows adding new (unhidden) files even while icons are hidden, | |
# at which point they can be hidden also by executing again, | |
# since the script only unhides when ALL icons are hidden. |
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/bash | |
selfBaseName=$(basename -- "$(readlink -f -- "$0")") | |
usage="Usage: ${selfBaseName} <username> <command>" | |
if test $# -ne 2; then | |
echo $usage | |
exit | |
fi |
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
#pragma once | |
template<typename T> | |
class contains { | |
const T& item; | |
public: | |
contains(const T& item) : item(item) {} | |
template<typename C> |
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
import android.arch.lifecycle.Observer; | |
import android.support.annotation.Nullable; | |
public abstract class IgnorantObserver<T> implements Observer<T>{ | |
private boolean isIgnoring = false; | |
private boolean doingIgnorantly = false; | |
public IgnorantObserver(){ | |
this(false); | |
} |