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 | |
exec kdialog --title note --passivepopup "$*" 5 |
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 static java.util.Arrays.asList; | |
import static org.hamcrest.MatcherAssert.assertThat; | |
import org.junit.Test; | |
import com.google.common.collect.ImmutableList; | |
public class MyMatchersTest { | |
@Test | |
public void testSameAsSet() throws Exception { |
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 | |
git log -1 --format='format:git.hash="%H" | |
git.date="%ci" | |
git.ref="%d"' > include.git.conf |
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
cd conf/evolutions/default | |
mkdir ../extracted | |
for i in *.sql ; do awk '/# --- !Ups/{flag=1;next}/# --- !Downs/{flag=0}flag' "$i" > ../extracted/"$i" ; done |
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 | |
# | |
# Generate a free icons.c for minidlna from Debian's SVG logo | |
# | |
# Copyright (C) 2011 Benoît Knecht <[email protected]> | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions | |
# are met: | |
# 1. Redistributions of source code must retain the above copyright |
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 | |
set -e | |
BASEDIR=/opt/seafile/mysite | |
OUTDIR=${BASEDIR}/backup/db | |
mkdir -p ${OUTDIR} | |
SUFFIX=.`date +"%Y-%m-%d-%H-%M-%S"` | |
sqlite3 ${BASEDIR}/ccnet/GroupMgr/groupmgr.db .dump | gzip > ${OUTDIR}/groupmgr.db.bak${SUFFIX}.gz | |
sqlite3 ${BASEDIR}/ccnet/PeerMgr/usermgr.db .dump | gzip > ${OUTDIR}/usermgr.db.bak${SUFFIX}.gz | |
sqlite3 ${BASEDIR}/seafile-data/seafile.db .dump | gzip > ${OUTDIR}/seafile.db.bak${SUFFIX}.gz |
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 | |
set -e | |
#set -x | |
# Tested on debian jessie | |
# Install goaccess | |
# Define your log format in /etc/goaccess.conf | |
# e.g log-format %h %^[%d:%^] "%r" %s %b "%R" "%u" |
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 | |
# deps: | |
# - have oracle jdk >= 7 build with java-package | |
# see https://wiki.debian.org/JavaPackage if you don't know how | |
# - apt-get install equivs | |
# | |
# Debian actually kind of suggests it but the doc ist kind of old: | |
# https://www.debian.org/doc/manuals/debian-java-faq/ch13.html | |
# | |
# inspired by RJ <[email protected]> |
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
foo: foo.cpp bar.o | |
$(info @ is $@ ) | |
$(info % is $% ) | |
$(info < is $< ) | |
$(info ? is $? ) | |
$(info ^ is $^ ) | |
$(info + is $+ ) | |
$(info | is $| ) | |
$(info * is $* ) | |
${CXX} ${CXXFLAGS} -o $@ $< |
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
# Save this file to ~/.config/fish/functions/push-line.fish | |
# Bind the function by using this in ~/.config/fish/functions/fish_user_key_bindings.fish | |
# function fish_user_key_bindings | |
# # For example alt+q | |
# bind \eq push-line | |
# end | |
function push-line | |
commandline -f kill-whole-line |