Skip to content

Instantly share code, notes, and snippets.

View ThisIsAreku's full-sized avatar
:shipit:

Alexandre Boucey ThisIsAreku

:shipit:
View GitHub Profile
#!/bin/sh
cd "$(dirname "$0")"
. ./plex_config
wget -qO- "${PLEXPY_URL}api/v2?apikey=${PLEXPY_TOKEN}&cmd=get_activity" | ./jq-linux64 -M 'def c(d): reduce .response.data.sessions[] as $n (0; if $n.transcode_decision==d then . + 1 else . + 0 end); [{transcode_type: "transcode", "activity_stream_count": .|c("transcode")}, {transcode_type: "direct_play", "activity_stream_count": .|c("direct play")}, {transcode_type: "direct_stream", "activity_stream_count": .|c("direct stream")}]'
@ThisIsAreku
ThisIsAreku / .env
Last active October 2, 2019 09:54
.env
# Source this file in your .zshrc BEFORE "source $ZSH/oh-my-zsh.sh"
export TERM="xterm-256color"
# Set your username here
export DEFAULT_USER=
# Digital Ocean Token
export DO_TOKEN=
# Path to Android SDK
@ThisIsAreku
ThisIsAreku / docker-compose.yml
Last active September 15, 2017 15:16
Docker devservices
version: '2'
services:
mysql:
image: "mariadb:latest"
ports:
- "3306:3306"
volumes:
- ./mysql:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: "root"
@ThisIsAreku
ThisIsAreku / enable_uapv_workspaces.sh
Created September 25, 2015 07:33
Enable workspaces @ UAPV
gsettings set org.compiz.core:/org/compiz/profiles/unity/plugins/core/ hsize 2
gsettings set org.compiz.core:/org/compiz/profiles/unity/plugins/core/ vsize 2
@ThisIsAreku
ThisIsAreku / synobridge.sh
Created July 1, 2015 18:27
Bridge eth0 and eth1 in Synology (DS414slim)
#!/bin/sh
SCRIPT_NAME="S03synobridge.sh"
SCRIPT_PATH="/usr/syno/etc/rc.d/"
GATEWAY="192.168.0.254"
NETMASK="255.255.255.0"
IP="192.168.0.1"
if [ "$1" == "install" ]; then
if [ ! -f "${SCRIPT_PATH}${SCRIPT_NAME}" ]; then
@ThisIsAreku
ThisIsAreku / add_game.bat
Created June 29, 2014 16:40
wbfs add file (wbfs or iso) and convert to iso
@echo off
Setlocal EnableDelayedExpansion
cd %~dp0
SET output=wbfs
SET tool=wbfs_file.exe
REM -- Safeguard --
SET info_file=-
SET game_id=-