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
| SUBSYSTEM=="usb", ATTR{idVendor}=="1781", ATTR{idProduct}=="0c9f", GROUP="plugdev", MODE="0666" |
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/sh | |
| # | |
| # Bacula interface to FreeBSD chio autoloader command with | |
| # multiple drive support | |
| # (By Lars K�ller, [email protected], 2004) | |
| # | |
| # If you set in your Device resource | |
| # | |
| # Changer Command = "path-to-this-script/chio-bacula" %c %o %S %a | |
| # you will have the following input to this script: |
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
| #Encrypt | |
| pg_dump -d bacula -Z 5 | openssl smime -encrypt -binary -aes-256-cbc -out /var/db/bacula/bacula.sql.gzip.enc -outform DER /usr/local/etc/bacula/fd.pem /usr/local/etc/bacula/master.cert | |
| #Decrypt | |
| openssl smime -decrypt -in bacula.sql.gzip.enc -inform DER -binary -inkey master.key | gunzip > bacula.sql |
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
| #!/usr/bin/env python2 | |
| import argparse | |
| from ws4py.client.threadedclient import WebSocketClient | |
| import time | |
| import threading | |
| import sys | |
| import urllib | |
| import Queue | |
| import json |
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
| #removes first audio stream without transcoding | |
| ffmpeg -i file.mp4 -map 0:0 -map 0:2 -acodec copy -vcodec copy new_file.mp4 | |
| #!/bin/bash | |
| for name in *.mkv; do | |
| ffmpeg -i "$name" -map 0:0 -map 0:2 -acodec copy -vcodec copy "converted/$name" | |
| done |
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
| #! /usr/bin/env python3 | |
| import os | |
| import locale | |
| import subprocess | |
| import sys | |
| import shutil | |
| from dialog import Dialog |
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
| # systemctl edit getty@tty1 | |
| [Service] | |
| ExecStart= | |
| ExecStart=-/sbin/agetty --autologin user --noclear %I $TERM |
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
| # creates a LaTeX representation of the math for a scipy linregress straight line fit object | |
| def fit_latex(fit, precision=2, xname='x', yname='y', xunit='', yunit='', stats_precision=4, show_R2=True, show_standard_error=True): | |
| return '${y}={slope}{x}{unit_conversion} {sign} {intercept}{yunit}${stats}'.format(slope=round(fit.slope, precision), | |
| intercept=round(abs(fit.intercept), precision), | |
| x=xname, | |
| y=yname, | |
| sign='+' if fit.intercept >= 0 else '-', | |
| yunit=r'\,\mathrm{{{}}}'.format(yunit) if yunit else '', | |
| unit_conversion=r'\,\frac{{\mathrm{{{yunit}}}}}{{\mathrm{{{xunit}}}}}'.format(yunit=yunit, xunit=xunit) if xunit or yuni |
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
| # choco list --local-only --id-only | |
| # Chocolatey v0.10.11 | |
| 7zip | |
| 7zip.install | |
| adb | |
| adobereader | |
| android-sdk | |
| astrogrep | |
| audacity | |
| autohotkey.portable |
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 | |
| exitcode=1 | |
| mountpoints="/run/user/1000/gvfs" | |
| #do check if the correct usb mtp device is mounted | |
| for mountpoint in $mountpoints/mtp*/; | |
| do | |
| echo "Testing $mountpoint" | |
| sync_folder="$mountpoint/Internal shared storage" | |
| #if the device contains a .sync_boox file in internal storage, proceed | |
| if test -e "$sync_folder/.sync_boox";then |