Skip to content

Instantly share code, notes, and snippets.

@jDmacD
jDmacD / pull.yml
Last active January 17, 2022 11:41
- hosts: localhost
tasks:
- debug:
msg: "hello"
@jDmacD
jDmacD / stickyanimate.js
Created September 30, 2018 18:11
javascript function to animate sticky header
updateStickyText: function() {
var t = this
if (!this.ignoreStickyTitleChange) {
var e = document.body.getBoundingClientRect()
, r = this.querySelectorAllCached(".sticky-change, .sticky-stop")
, n = document.querySelector(".sticky-stop")
, o = this.getScrollElement().scrollTop
, i = this.querySelectorCached("h1.sticky")
if (null !== i) {
var a = i.getBoundingClientRect()
task printProps {
doFirst {
println src
println dest
}
}
task movDir {
import docker, sys
client = docker.from_env()
container_name = sys.argv[1]
container = client.containers.get(container_name)
print(container.status)
import qb
import sys
supervisor_ip = str(sys.argv[1])
res = qb.ping(supervisor=supervisor_ip, asDict=True)
if bool(res) == False:
sys.exit("Qube Supervisor is down")
else:
@jDmacD
jDmacD / archive.py
Last active July 14, 2017 16:16
deletes jobs with X status over X days old
#!/usr/bin/python
# Below are required imports for the script to run
import os
import sys
import qb
import hashlib
import re
import time, datetime
@jDmacD
jDmacD / qbBuild.sh
Last active November 28, 2024 13:07
qbittorrent from scratch for pi
#!/bin/bash
# https://github.com/qbittorrent/qBittorrent/wiki/Setting-up-qBittorrent-on-Ubuntu-server-as-daemon-with-Web-interface-(15.04-and-newer)
# https://github.com/qbittorrent/qBittorrent/wiki/Compiling-qBittorrent-on-Debian-and-Ubuntu#Required_dependencies
cd ~/
sudo apt-get install libboost-dev libboost-system-dev build-essential -y
sudo apt-get install libqt4-dev -y
sudo apt-get install qtbase5-dev qttools5-dev-tools -y
Loaded plugins: update-motd, upgrade-helper
Resolving Dependencies
--> Running transaction check
---> Package gdk-pixbuf2.x86_64 0:2.32.1-1.fc23 will be installed
--> Processing Dependency: libpng16.so.16(PNG16_0)(64bit) for package: gdk-pixbuf2-2.32.1-1.fc23.x86_64
--> Processing Dependency: libpng16.so.16()(64bit) for package: gdk-pixbuf2-2.32.1-1.fc23.x86_64
--> Running transaction check
---> Package libpng.x86_64 2:1.2.49-2.14.amzn1 will be updated
--> Processing Dependency: libpng = 2:1.2.49-2.14.amzn1 for package: 2:libpng-devel-1.2.49-2.14.amzn1.x86_64
--> Processing Dependency: libpng12.so.0()(64bit) for package: 2:libpng-devel-1.2.49-2.14.amzn1.x86_64
Loaded plugins: priorities, update-motd, upgrade-helper
4627 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package db4.x86_64 0:4.7.25-18.11.amzn1 will be obsoleted
--> Processing Dependency: libdb-4.7.so()(64bit) for package: ruby20-libs-2.0.0.648-1.29.amzn1.x86_64
--> Processing Dependency: libdb-4.7.so()(64bit) for package: cyrus-sasl-lib-2.1.23-13.16.amzn1.x86_64
--> Processing Dependency: libdb-4.7.so()(64bit) for package: rpm-4.11.2-2.73.amzn1.x86_64
--> Processing Dependency: libdb-4.7.so()(64bit) for package: pam-1.1.8-12.33.amzn1.x86_64
--> Processing Dependency: libdb-4.7.so()(64bit) for package: sendmail-8.14.4-8.12.amzn1.x86_64
Loaded plugins: update-motd, upgrade-helper
Installed Packages
atk-devel.x86_64 2.18.0-1.fc23 @fedora
Available Packages
atk-devel.i686 2.18.0-1.fc23 fedora
atk-devel.x86_64 2.18.0-1.fc23 fedora
Loaded plugins: update-motd, upgrade-helper
Available Packages
cairo-devel.x86_64 1.12.14-6.8.amzn1 amzn-main
cairo-devel.i686 1.14.2-2.fc23 fedora