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 keyboard | |
import time | |
import random | |
while True: | |
keyboard.press_and_release("F13") | |
interval = random.randint(1, 179) | |
time.sleep(interval) |
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
############################# | |
### GENERATE CERT AND KEY ### | |
############################# | |
# when generating key and cert, use password provided by administrator | |
cd ~/Workspace/Silvermedia/vpn | |
kozak127@callisto:~/Workspace/Silvermedia/vpn$ openssl pkcs12 -in michal.wesoly.p12 -nocerts -nodes -out michal.wesoly.key | |
Enter Import Password: |
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 __future__ import print_function | |
import os.path | |
import json | |
import time | |
from google.auth.transport.requests import Request | |
from google.oauth2.credentials import Credentials | |
from google_auth_oauthlib.flow import InstalledAppFlow | |
from googleapiclient.discovery import build |
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
# paste this into .zshrc/.bashrc | |
# check if `docker-machine` command exists | |
if command -v docker-machine > /dev/null; then | |
# fetch the first running machine name | |
local machine=$(docker-machine ls | grep "Running" | head -n 1 | awk '{ print $1 }') | |
if [ "$machine" != "" ]; then | |
eval "$(docker-machine env $machine)" | |
fi | |
fi |
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 cz.jirutka.rsql.parser.ast.AndNode; | |
import cz.jirutka.rsql.parser.ast.ComparisonNode; | |
import cz.jirutka.rsql.parser.ast.OrNode; | |
import cz.jirutka.rsql.parser.ast.RSQLVisitor; | |
import org.springframework.data.jpa.domain.Specification; | |
public class CustomRsqlVisitor<T> implements RSQLVisitor<Specification<T>, Void> { | |
private RsqlSpecificationBuilder<T> builder; |
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
# MY ALIASES | |
alias pingg="ping google.com" | |
alias mtrg="mtr google.com" | |
alias svn_remove_missing="svn status | grep '^!' | awk '{print $2}' | xargs svn delete" | |
alias run-proxy="ssh -N -D 9876 misc@kozak127.eu" | |
# DOUBLE LOGGING | |
PROMPT_COMMAND='echo [$$] $(date) $(history 1) >>~/.local/share/logs/bash' | |
# BASH PROMPT SETUP |
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
#WINDOW VALUES | |
own_window yes | |
own_window_class Conky | |
own_window_type normal | |
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager | |
own_window_transparent yes | |
own_window_argb_visual yes | |
#VISUAL VALUES | |
use_xft yes |
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
WOL_DISABLE=N in /etc/default/tlp | |
NETDOWN=no in /etc/default/halt | |
sudo systemctl enable wol@eth3 |
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 | |
### DEFINE UBUNTU VERSION SHORT CODENAME | |
# IF YOU ARE USING UBUNTU-BASED DISTRO, BUT NOT UBUNTU (LINUX MINT ETC.) | |
# RUN SCRIPT WITH NAME OF BASE UBUNTU DISTRO | |
# FOR LINUX MINT 17 | |
# ./startup_install.sh trusty |
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
<property name="XF86AudioNext" type="string" value="dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next"/> | |
<property name="XF86AudioPrev" type="string" value="dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous"/> | |
<property name="XF86AudioPlay" type="string" value="dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause"/> | |
<property name="XF86AudioStop" type="string" value="dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop"/> |
NewerOlder