Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* DDNS Service: Custom
* DYNDNS Server: <yourserver.com>
* Username:
* Password:
* Host Name:
* URL: /cloudflare_update.php?key=&hostname=
*/
/**
# http://www.opscode.com/blog/2013/03/11/chef-11-server-up-and-running/
# https://github.com/opscode/omnibus-chef-server/blob/master/files/chef-server-cookbooks/chef-server/attributes/default.rb
# http://www.opscode.com/blog/2013/03/12/5106/
server_name = "chef.domain"
api_fqdn server_name
rabbitmq['enable'] = false
rabbitmq['node_port'] = '5672'
#rabbitmq['node_ip_address'] = '10.12.10.65'
rabbitmq['node_ip_address'] = '127.0.0.1'
rabbitmq['nodename'] = 'chef@localhost'
copy proxmox iso on usb stick
#fdisk -l
#mount /dev/sdb1 /mnt
#mount -o loop -t iso9660 /mnt/proxmox_1-7.iso /mnt
#cd /mnt
#chroot /mnt sbin/unconfigured.sh
@KingPin
KingPin / functions.php
Created March 16, 2016 18:38 — forked from maddisondesigns/functions.php
Remove Yoast SEO nag after update
<?php
class ahRemoveYoastNag_Remove_Yoast_SEO_Nag {
private $yoastPluginFile;
public function __construct() {
$this->yoastPluginFile = "wordpress-seo/wp-seo.php";
Verifying that +kingpin is my blockchain ID. https://onename.com/kingpin
@KingPin
KingPin / gist:dfa1e84a21b85c657e53d04420f86273
Last active July 20, 2017 03:10
remove 4 numbers from front and add to end of the file name, accounting for spaces, dashes, and adding the numbers in parentheses
find ./ -name '???? - *.xml' -print0 | while read -d ''; do
[[ $REPLY =~ (.*)/(....)\ -\ (.*)\.xml$ ]] || continue
path=${BASH_REMATCH[1]}
num=${BASH_REMATCH[2]}
str=${BASH_REMATCH[3]}
echo mv "$REPLY" "$path/$str ($num).xml"
done
@KingPin
KingPin / select.py
Created July 25, 2017 00:17
python connect to mysqldb and select
import MySQLdb
host = '10.10.10.10'
user = 'root'
password = 'password'
port = 3306
db = 'lm'
dbc = MySQLdb.Connection(
host=host, user=user, passwd=password, port=port, db=db
@KingPin
KingPin / restart_service.sh
Created September 11, 2022 23:17
Service restarter on no log output
#!/bin/bash
# simple script to check logs, if no entries have been made in 45 seconds restart
set -x
PATH=$PATH:/usr/sbin
TS=$(date +%s)
timer1=$(expr $TS - $(date +%s -r /path/to/some/file.log)) # make sure to set the log path here
if [ "$timer1" -gt 45 ]
@KingPin
KingPin / docker-compose.yml
Last active April 7, 2023 14:58
run wiki.js via docker with postgres and caddy webserver in docker.
version: '3'
services:
wiki:
image: requarks/wiki:2
container_name: wiki
restart: unless-stopped
depends_on:
- wiki-db
environment:
@KingPin
KingPin / jellyfin_compose.yml
Last active November 25, 2023 18:36
jellyfin podlink rclone compose file
version: "3"
services:
jellyfin:
image: lscr.io/linuxserver/jellyfin:latest
container_name: jellyfin
environment:
- PUID=1000
- PGID=1000