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
// cc -Wall mb.c $(pkg-config --cflags --libs libmodbus) | |
// | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <modbus.h> | |
int main(int argc, char **argv) { | |
modbus_t *mb; | |
uint16_t motion, no_motion; |
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 bash | |
if [ -S "$SSH_AUTH_SOCK" ]; then | |
ln -sf "$SSH_AUTH_SOCK" /tmp/ssh_auth_sock | |
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
[Unit] | |
Description=openvscode_server | |
After=network.target | |
[Service] | |
Type=exec | |
ExecStart=/path/to/openvscode-server/bin/openvscode-server \ | |
--host 127.0.0.1 \ | |
--connection-token-file /path/to/.openvscode_serverrc \ | |
--telemetry-level 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
#!/usr/bin/env bash | |
if [ $# == 0 ]; then | |
msg=$(cat -) | |
else | |
msg="$@" | |
fi | |
if [ -n "$TMUX" ]; then | |
client_tty=$(tmux display-message -p '#{client_tty}') |
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 bash | |
set -e | |
buf=$(cat "${@:--}" | base64 | tr -d '\n') | |
# OSC 52 term seq | |
seq="\033]52;c;${buf}\a" | |
if [ -n "${SSH_TTY}" ]; then | |
printf "$seq" > "${SSH_TTY}" | |
elif [ -n "${TMUX}" ]; then | |
client_tty=$(tmux display-message -p '#{client_tty}') |
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 | |
for i in /sys/bus/pci/devices/*; do | |
if [ -s "$i/label" ] && grep -q 'Sound' "$i/label"; then | |
echo 1 >> "$i/remove" | |
fi | |
done | |
echo 1 >> /sys/bus/pci/rescan |
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
<!doctype html> | |
<body> | |
<script type='text/javascript'> | |
if ('loading' in HTMLImageElement.prototype) { | |
console.log('lazy loading supported...'); | |
} else { | |
console.log('needs polyfill...'); | |
} | |
</script> | |
</body> |
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=Console blank | |
[Service] | |
Type=oneshot | |
Environment=TERM=linux | |
StandardOutput=tty | |
TTYPath=/dev/console | |
ExecStart=/usr/bin/setterm -blank 2 |
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 bash | |
defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO |
NewerOlder