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 | |
# takes a screenshot of a window or region and copy to clipboard as png | |
# | |
# prerequisites: | |
# - maim | |
# - slop | |
# - xclip with -target support (available in AUR) | |
# | |
# @author https://github.com/jeremija |
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 | |
PREFIX='http://localhost:8080/oauth-example' | |
source 'tests-lib.sh' | |
# non-authenticated | |
test "curl $PREFIX/securedOAuth2Resources/my/clientRole" 401 | |
test "curl $PREFIX/securedOAuth2Resources/my/clientHasAnyRole" 401 | |
test "curl $PREFIX/securedOAuth2Resources/my/client" 401 | |
test "curl $PREFIX/securedOAuth2Resources/my/user" 401 |
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 | |
# /etc/init.d/autossh | |
### BEGIN INIT INFO | |
# Provides: autossh | |
# Required-Start: $remote_fs $syslog $network | |
# Required-Stop: $remote_fs $syslog $network | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Starts autossh at boot. |
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
! remove Caps Lock | |
clear lock | |
remove Lock = Caps_Lock | |
remove Shift = Caps_Lock | |
! add Mode_switch | |
keycode 66 = NoSymbol NoSymbol | |
keycode 66 = Mode_switch | |
keysym h = h H Left NoSymbol NoSymbol NoSymbol | |
keysym j = j J Down NoSymbol NoSymbol NoSymbol |
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 | |
# Checks for a new version of Sublime Text and automatically downloads and | |
# extracts it. | |
# | |
# author: https://github.com/jeremija | |
SUBLIME_INSTALL_DIR="$HOME/opt/" | |
DOWNLOAD_LOC="/tmp/sublime.tar.bz2" | |
CURRENT_VERSION=$(sublime --version | grep -o '[0-9]*') | |
URL=$(wget -O - -q https://www.sublimetext.com/3dev | grep -o 'http://[^"]*x64.tar.bz2') |
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
fluidsynth --server --audio-driver=jack --connect-jack-outputs /usr/share/sounds/sf2/FluidR3_GM.sf2 |
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
# udev rules to be placed in /etc/udev/rules.d | |
# this is from https://github.com/lentinj/tp-compact-keyboard | |
SUBSYSTEM=="input", \ | |
ATTRS{name}=="ThinkPad Compact Bluetooth Keyboard with TrackPoint", \ | |
RUN+="/etc/udev/scripts/tp-compact-keyboard --fn-lock-enable" | |
# this is my script | |
SUBSYSTEM=="input", \ | |
ATTRS{name}=="ThinkPad Compact Bluetooth Keyboard with TrackPoint", \ |
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
package test.hibernate; | |
import org.hibernate.Session; | |
import org.hibernate.SessionFactory; | |
import org.hibernate.boot.registry.StandardServiceRegistryBuilder; | |
import org.hibernate.cfg.Configuration; | |
import org.hibernate.criterion.CriteriaSpecification; | |
import org.hibernate.criterion.Restrictions; | |
import org.hibernate.service.ServiceRegistry; | |
import org.junit.Before; |
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
import org.springframework.jdbc.core.BeanPropertyRowMapper; | |
import java.beans.PropertyDescriptor; | |
import java.sql.ResultSet; | |
import java.sql.SQLException; | |
import java.time.LocalDate; | |
import java.time.LocalDateTime; | |
import java.time.LocalTime; | |
public class Jsr310SupportedBeanPropertyRowMapper<T> extends BeanPropertyRowMapper<T> { |
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 | |
# | |
# Uses subdl to download video subtitles and muxes it to a new mkv video. The only requirement is for the video is to | |
# be mkv-compatible. | |
# | |
# You can find the subdl here: https://github.com/akexakex/subdl/blob/master/subdl | |
# | |
# If you use xfce4/thunar, custom actions can be added for *.mp4 and *.mkv video files: | |
# | |
# xfce4-terminal --hold --execute /usr/local/bin/muxtitles %F |