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 -u | |
CURRENT_PATH="/var/lib/quassel/quassel-storage.sqlite" | |
BAK_PATH="/data/backup/quasselcore/quassel-storage.sqlite.bak" | |
DATE_TO_PRUNE='-180 day' | |
# This is an additional filter to only prune from a selected list of buffers, |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#!/usr/bin/env python3 | |
import os | |
import sys | |
import dateutil.parser | |
import xml.etree.ElementTree | |
nss = {'gnc': 'http://www.gnucash.org/XML/gnc', | |
'act': 'http://www.gnucash.org/XML/act', | |
'book': 'http://www.gnucash.org/XML/book', |
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
From 1f751f8c68c9d67c0108747755d43c4449cd9a43 Mon Sep 17 00:00:00 2001 | |
From: zertrin <[email protected]> | |
Date: Thu, 8 Oct 2020 19:09:54 +0800 | |
Subject: [PATCH] Update Mapbox API | |
--- | |
assets/js/academic.js | 36 +++++++++++++++++++----------------- | |
1 file changed, 19 insertions(+), 17 deletions(-) | |
diff --git a/assets/js/academic.js b/assets/js/academic.js |
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
term screen-256color | |
defscrollback 50000 | |
bind ^x | |
bind x | |
bind K kill | |
bind h focus left | |
bind j focus down | |
bind k focus up | |
bind l focus right | |
bind t focus top |
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
# If you come from bash you might have to change your $PATH. | |
export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load --- if set to "random", it will | |
# load a random theme each time oh-my-zsh is loaded, in which case, | |
# to know which specific one was loaded, run: echo $RANDOM_THEME | |
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes |
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
PROMPT='%{$fg_bold[red]%}%* %(!.%{$fg_bold[blue]%}.%{$fg_bold[yellow]%})%n@%m %{$fg_bold[cyan]%}%~$(git_prompt_info)% %(!.%{$fg_bold[red]%}#.%{$fg_bold[green]%}$)%{$reset_color%} ' | |
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[white]%}(" | |
ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}" |
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
#!/usr/bin/env python2 | |
""" | |
quicky script that compares two conda environments | |
can be handy for debugging differences between two environments | |
This could be made much cleaner and more flexible -- but it does the job. | |
Please let me know if you extend or improve 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
# List unique values in a DataFrame column | |
pd.unique(df.column_name.ravel()) | |
# Convert Series datatype to numeric, getting rid of any non-numeric values | |
df['col'] = df['col'].astype(str).convert_objects(convert_numeric=True) | |
# Grab DataFrame rows where column has certain values | |
valuelist = ['value1', 'value2', 'value3'] | |
df = df[df.column.isin(valuelist)] |
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 find-obsolete() { | |
local pid cmd file | |
for pid in $(\grep '(deleted)' /proc/*/maps | \grep -v '/dev/zero' | cut -d/ -f 3 | sort -un); do | |
cmd=$(ps -o comm -p $pid | tail -n 1) | |
for file in $(\grep '(deleted)' /proc/$pid/maps | \grep -v '/dev/zero' | awk '{print $6}' | sort -u); do | |
echo "$pid $cmd $file" | |
done | |
done | column -t | |
} |
NewerOlder