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
[Unit] | |
Description=Music Player Daemon | |
[Service] | |
ExecStart=/home/jp/.config/systemd/user/headset-switcher.sh | |
[Install] | |
WantedBy=default.target |
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
var fields = originalInvoice::class.memberProperties | |
var string = "" | |
for (field in fields) { | |
if (field.getter.call(originalInvoice) != field.getter.call(this)) string += "${field.name}\n" | |
} | |
string |
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
Reason: | |
java.lang.LinkageError: loader constraint violation: when resolving interface method "groovy.text.Template.make(Ljava/util/Map;)Lgroovy/lang/Writable;" the class loader (instance of org/codehaus/groovy/tools/RootLoader) of the current class, com/kms/katalon/core/util/StrSubstitutor, and the class loader (instance of sun/misc/Launcher$AppClassLoader) for the method's defining class, groovy/text/Template, have different Class objects for the type groovy/lang/Writable used in the signature | |
at com.kms.katalon.core.util.StrSubstitutor.replace(StrSubstitutor.java:44) | |
at com.kms.katalon.core.testobject.ObjectRepository.lambda$0(ObjectRepository.java:261) | |
at com.kms.katalon.core.testobject.ObjectRepository.findWebUIObject(ObjectRepository.java:258) | |
at com.kms.katalon.core.testobject.ObjectRepository.readTestObjectFile(ObjectRepository.java:206) | |
at com.kms.katalon.core.testobject.ObjectRepository.findTestObject(ObjectRepository.java:174) | |
at com.kms.katalon.core.testobject.ObjectRepository.findTestObject( |
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: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1791427 | |
# /etc/systemd/system/touchpad-sleep.service | |
# restore touchpad on suspend | |
[Unit] | |
Description=Restore Touchpad on suspend | |
Before=sleep.target | |
StopWhenUnneeded=yes | |
[Service] |
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
# based on https://medium.com/@nicklee1/prepending-your-git-commit-messages-with-user-story-ids-3bfea00eab5a | |
# Include any branches for which you wish to disable this script | |
if [ -z "$BRANCHES_TO_SKIP" ]; then | |
BRANCHES_TO_SKIP=(master develop staging test) | |
fi | |
# Get the current branch name and check if it is excluded | |
BRANCH_NAME=$(git symbolic-ref --short HEAD) | |
BRANCH_EXCLUDED=$(printf "%s\n" "${BRANCHES_TO_SKIP[@]}" | grep -c "^$BRANCH_NAME$") |
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 copy | |
import itertools | |
def update_list_by_dict(target: list, value: dict): | |
""" | |
Updates a list using keys from dictionary | |
May be helpful if you want a fuzzy update of a list | |
If key greater than list size, list will be extended | |
If list value is dict, it's deep updated |
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 | |
mkdir -p out | |
convert *.JPG -background white -resize "1500x1500" -gravity Center -extent 1500x1500 -rotate 90 -set filename:f '%t' out/'%[filename:f].png' |
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
{ | |
"problemMatcher": { | |
"owner": "python", | |
"fileLocation": [ | |
"relative", | |
"${workspaceFolder}" | |
], | |
"pattern": { | |
"regexp": "^(.*):(\\d+):(\\d+):\\s+(W|E).+:\\s+(.*)$", | |
"file": 1, |
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
[alarm@alarmpi records]$ motion | |
[37881728:motion] [NTC] [ALL] conf_load: Processing thread 0 - config file /etc/motion/motion.conf | |
[37881728:motion] [NTC] [ALL] motion_startup: Motion 4.1.1 Started | |
[37881728:motion] [NTC] [ALL] motion_startup: Logging to syslog | |
[37881728:motion] [NTC] [ALL] motion_startup: Using log type (ALL) log level (DBG) | |
[37881728:motion] [INF] [ALL] conf_output_parms: Writing configuration parameters from all files (1): | |
[37881728:motion] [INF] [ALL] Thread 0 - Config file: /etc/motion/motion.conf | |
[37881728:motion] [INF] [ALL] daemon off | |
[37881728:motion] [INF] [ALL] process_id_file /var/run/motion/motion.pid | |
[37881728:motion] [INF] [ALL] setup_mode off |
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
az account set --subscription $SubscriptionID | |
snapshotId=$(az snapshot show -g $ResourceGroupName -n $snapshotName --query "id" -o tsv ) | |
# Get the SAS for the snapshotId | |
snapshotSasUrl=$(az snapshot grant-access -g $ResourceGroupName -n $snapshotName --duration-in-seconds 3600 -o tsv) | |
# Setup the target storage account in another region | |
targetStorageAccountKey=$(az storage account keys list -g $ResourceGroupName --account-name $targetStorageAccountName --query "[:1].value" -o tsv) | |
storageSasToken=$(az storage account generate-sas --expiry 2017-05-02'T'12:00'Z' --permissions aclrpuw --resource-types sco --services b --https-only --account-name $targetStorageAccountName --account-key $targetStorageAccountKey -o tsv) |
NewerOlder