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
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
# 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 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
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 |
OlderNewer