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 all_files_deleted { | |
local dir=$1 files | |
readarray -t files < <(git ls-tree HEAD -r --name-only -- "${dir}") | |
[[ ${#files[@]} -eq 0 ]] && return 0 | |
printf '%s\0' "${files[@]}" | xargs -0 git status --porcelain -- 2>/dev/null | \ | |
awk -v t="${#files[@]}" '/^D/ { ++c } END { exit(c == t ? 0 : 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
function ls { | |
local orig_args=("$@") d_opt=() | |
local -i argc=0 | |
while [[ $# -gt 0 ]]; do | |
case $1 in | |
-[aAbBcCdDfgGhHiklLmnNorRsStuUvxXZ1]|--all|--almost-all|--author|--context|--dereference|--dereference-command-line|--dereference-command-line-symlink-to-dir|--directory|--dired|--file-type|--full-time|--group-directories-first|--help|--hide-control-chars|--human-readable|--ignore-backups|--inode|--kibibytes|--literal|--no-group|--numeric-uid-gid|--quote-name|--recursive|--reverse|--show-control-chars|--size|--version|--zero) | |
;; | |
-[ITpw]*|@(--block-size|--format|--hide|--ignore|--indicator-style|--indicator-style|--quoting-style|--sort|--tabsize|--time|--time-style|--width)?(=*)) | |
get_opt_and_optarg_gnu "${@: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
diff --git a/src/fe-gtk/notifications/notification-freedesktop.c b/src/fe-gtk/notifications/notification-freedesktop.c | |
index a23284e5..09b15216 100644 | |
--- a/src/fe-gtk/notifications/notification-freedesktop.c | |
+++ b/src/fe-gtk/notifications/notification-freedesktop.c | |
@@ -69,7 +69,7 @@ notification_backend_show (const char *title, const char *text) | |
g_variant_builder_close (¶ms); | |
g_variant_builder_close (¶ms); | |
- g_variant_builder_add (¶ms, "i", -1); /* Expiration */ | |
+ g_variant_builder_add (¶ms, "i", 20000); /* Expiration */ |
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
~ [1]> help | |
help: Help is being displayed in xdg-open. | |
~> wineserver: using server-side synchronization. | |
wine: RLIMIT_NICE is <= 20, unable to use setpriority safely | |
0110:fixme:exec:SHELL_execute flags ignored: 0x00000100 | |
wineserver: using server-side synchronization. | |
wine: RLIMIT_NICE is <= 20, unable to use setpriority safely | |
0110:fixme:exec:SHELL_execute flags ignored: 0x00000100 | |
wineserver: using server-side synchronization. |
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
diff --git a/lib/portage/package/ebuild/doebuild.py b/lib/portage/package/ebuild/doebuild.py | |
index 8b65a78..ea09721 100644 | |
--- a/lib/portage/package/ebuild/doebuild.py | |
+++ b/lib/portage/package/ebuild/doebuild.py | |
@@ -1006,6 +1006,10 @@ def doebuild( | |
) | |
if mydo in clean_phases: | |
+ for f in ["keeptemp", "keepwork"]: | |
+ if f in mysettings.features: |
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-checkout-last-version | |
# | |
# Extracts the last version of a file before it was removed from git | |
# | |
# Usage: git-checkout-laster-version[.bash] [options] [--] 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
#!/bin/bash | |
# ------------------------------------------------------------------------------ | |
# git-move | |
# | |
# Moves commits in a "context" to a new base commit within the same context | |
# | |
# The context can be a branch or simply a commit representing itself and the | |
# chain of commits behind it. |
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 get_opt_and_optarg_gnu { | |
local optional=false | |
if [[ $1 == @optional ]]; then | |
optional=true | |
shift | |
fi | |
OPT=$1 OPTARG= OPTSHIFT=0 |
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 stopwatch { | |
local start=${EPOCHREALTIME} diff_i diff_f stop_at= IFS=. | |
trap 'stop_at=${EPOCHREALTIME}' INT | |
printf '\r\e[K%s.%06d' 0 0 | |
function stopwatch_get_diff { | |
set -- $1 $2 | |
diff_i=$(( 10#$3 - 10#$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
// get-default-gsettings-backend.c | |
// Compilable using 'gcc $(pkgconf --cflags --libs gio-2.0) -o get-default-gsettings-backend{,.c}' | |
// Author: konsolebox | |
// Copyright Free / Public Domain | |
#define G_SETTINGS_ENABLE_BACKEND 1 | |
#include <assert.h> | |
#include <gio/gio.h> | |
#include <gio/gsettingsbackend.h> |
NewerOlder