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/env -i python | |
| from datetime import * | |
| from dateutil.easter import * | |
| import sys | |
| import json | |
| def get_offdays(year): | |
| return [ | |
| date(year, 1, 1), |
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 | |
| write() { | |
| i2cset -y 6 0x$6 0x${4/,} 0x$2 | |
| } | |
| ( | |
| cat << EOF | |
| Wrote 53 to 08, address 5a | |
| Wrote 53 to 08, address 5b |
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
| 0eNrdXe2Oo7gSfRd+wwr8QaC1u49x/4xaEUmcbjR8ZA30nd5RP8B9i/ts+yRrQwIkMYnJ6US9qxlpSIILu3xOlV1VZn46q6wRO5kWtfP000nXZVE5T99+OlX6UiSZ/q5IcuE8OdUuWQtvlyX1tpS599qsnA/XSYuN+OE8BR+uqUmZJdLbJYXIRveSj2fXEUWd1qnontV+eF8WTb4SUglzDwK2SVV7aVEJWasfXGdXVqpVWehnKEle8At3nXd9QX7h6gmbVIp1dwNzHTWWWpbZciVek7e0lLrVOpXrJq2XokhWmdg4T7VshNt/rZps+idsU1nVy7NRlT/SjfBUz4Qs0423fm2K73p4WnV1ovUY+PpTvktkUuvHOr87H+qGbZqpNt2QD3pzL0p1nT+aJFO6UTcUSuuqHyeSf3O0NptKLHvpekR6Ok60Smy1SqaVGpC7aXWdyFVZpOtPV+yU4M/ULR2eJpvq1YhV2qs1OFeq+pDudPtc1EmWHfVWS0yLF+dw19LQ77QW+X78m5FSxXabrlNRrN+9vNw0mfBIS8Tubq2sZVq8qcGU8n2vvf6TIpDS+vq78+TrERt/CT6eP9Tfc4WwGyjsP4DC9Xur5bdU1k2ruIOlau/wxJuQ73Wr7SPcncLur//9XwHPMG7eSxzmr8wyNaLSMHh/gEQ79kujlSLZ6LHV6ok9EBUiqibT+u0np2iyzNCxcD77gwey3wD7z2H/lODPZP9ivm79R+j23mCPrEnODgOPT8cdGeTGvdxaJkW1K2XtrURWXxIczVVoy6fXpDgl1ZFu2++7W5X9FNrgGfqrcWmpCHKsiIvQTWVZeKUUn4rVILBXLplUrmnWAusFxuAK46tm7942hX9NkxJQ+2miFzhgEm3tm4NJwcwkl9vK9e87/fc2e4G1Lz2ZmctsX38y0RfWCDrh+aOsZnR90cwGh3lhzXy6dfonLpiD2BZUzH627rrJ5V9xj2vtifks30Zu8ZoLK8nkBsmhlWSbTWlviqML/DLsoP+JFCP |
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
| diff --git a/src/kcms/rules/kcmrules.cpp b/src/kcms/rules/kcmrules.cpp | |
| index b794a06a9f..a10d80e6a4 100644 | |
| --- a/src/kcms/rules/kcmrules.cpp | |
| +++ b/src/kcms/rules/kcmrules.cpp | |
| @@ -316,7 +316,7 @@ QModelIndex KCMKWinRules::findRuleWithProperties(const QVariantMap &info, bool w | |
| const QString title = info.value("caption").toString(); | |
| const QString machine = info.value("clientMachine").toString(); | |
| const bool isLocalHost = info.value("localhost").toBool(); | |
| - | |
| + const bool isFullscreen = info.value("fullscreen").toBool(); |
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 machine | |
| import time | |
| uart = machine.UART(1, baudrate=115200, tx=machine.Pin(4), rx=machine.Pin(5), timeout=20) | |
| while True: | |
| if uart.any(): | |
| res = uart.readline().decode('utf-8') | |
| if 'U-Boot Boot Menu' in res: | |
| print('yes') | |
| uart.write('') |
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/zsh | |
| pool=zdata | |
| devices=$(zpool status -P $pool | grep /dev/ | awk '{print $1}') | |
| intervalinsec=120 | |
| while true; do | |
| zpool iostat -HyL zdata $intervalinsec 1 | | |
| grep -q '0 0 0 0' ; res=$? |
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 | |
| find_list() { | |
| a="$(zfs list -t filesystem,volume -s origin -H -o name,origin -r $1)" | |
| grep -P -- '-$' <<< "$a" | cut -f1 | |
| grep -Pv -- '-$' <<< "$a" | |
| } | |
| SSH() { | |
| ssh $remote_path $@ | |
| } |
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
| git_release() { | |
| curl -sL https://github.com/${repo}/releases/ | | |
| xmllint -html -xpath '//a[contains(@href, "releases")]/text()' - 2> /dev/null | | |
| grep -P '^v' | head -n1 | |
| } | |
| git_download() { | |
| repo=${1} | |
| file=${2} | |
| version=$(git_release) |
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
| aurpkg=proton-ge-custom | |
| data="$(curl https://aur.archlinux.org/cgit/aur.git/tree/.SRCINFO\?h\=$aurpkg 2> /dev/null | grep source\ = | cut -f 2- -d =)" | |
| ( | |
| echo '<services> | |
| <service name="tar_scm"> | |
| <param name="scm">git</param> | |
| <param name="url">'"https://aur.archlinux.org/${aurpkg}.git"'</param> | |
| </service>' |
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 | |
| card_name='Generic [HD-Audio Generic], device 0: ALC1220 Analog [ALC1220 Analog]' ##### PLEASE EDIT THIS | |
| card_name=$(sed -e 's/\[/\\\[/g' -e 's/\]/\\\]/g' <<< "$card_name") | |
| [[ -z "$1" || -n "$2" ]] && { | |
| echo usage: $(basename $0) '[:num]?(%)(-+)' | |
| echo same number / percentage accepted by 'amixer set' | |
| echo ie vol 5%+ | |
| echo ie vol 5 | |
| exit 1 |
NewerOlder