Skip to content

Instantly share code, notes, and snippets.

View GertJanFrl's full-sized avatar

Gert-Jan Anema GertJanFrl

  • Friesland, Nederland
  • 00:17 (UTC +01:00)
View GitHub Profile
@GertJanFrl
GertJanFrl / select-posts-by-cat-id.sql
Created January 22, 2020 23:19 — forked from robwent/select-posts-by-cat-id.sql
Select Wordpress posts by category ID
SELECT * FROM wp_posts
LEFT JOIN wp_term_relationships ON
(wp_posts.ID = wp_term_relationships.object_id)
LEFT JOIN wp_term_taxonomy ON
(wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id)
WHERE wp_posts.post_type = 'post'
AND wp_term_taxonomy.taxonomy = 'category'
AND wp_term_taxonomy.term_id = 48
ORDER BY post_date DESC
@GertJanFrl
GertJanFrl / share_unshare_libraries.py
Created November 4, 2018 16:50 — forked from JonnyWong16/share_unshare_libraries.py
Automatically share and unshare libraries for Plex users
# Run this script using "share" or "unshare" as arguments:
# To share the Plex libraries:
# python share_unshare_libraries.py share
# To unshare the Plex libraries:
# python share_unshare_libraries.py unshare
import requests
import sys
from xml.dom import minidom
@GertJanFrl
GertJanFrl / cloudbox-install.sh
Created November 4, 2018 16:26 — forked from Nottt/cloudbox-install.sh
Cloudbox install script
#!/bin/bash
# Docker Setup for streaming backend using cloudbox, intended to be run as root :
## To Do : Pass arguments to script if reboot is necessary, edit only the necessary line in plex-autoscan config file.
KERNEL=$(uname -r)
BASE=4.10
echo $KERNEL
if [ "$KERNEL" != "$BASE" ]; then
tput setaf 1; echo "You don't need to reboot, continuing install" && tput setaf 7;
@GertJanFrl
GertJanFrl / 0_reuse_code.js
Created February 28, 2014 15:23
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console