Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Joe Huss detain

🏠
Working from home
Block or report user

Report or block detain

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@detain
detain / README.md
Last active Sep 29, 2019
Parsed listing from http://s2.tinydl.info/Series/ overlaid with TheTVDB matching and additional information.
View README.md

Parsed listing from s2, s3, s4, and s5 .tinydl.info/Series/ overlaid with TheTVDB matching and additional information

  • After that the build_tinydl.php converts it to tinydl.json while loading up information from TheTVDB

Building The Data

  1. Run get_rclone_ls.sh to:
  • autoamtically define site entries in rclone for all 4 sites
  • asynchronously grab recursive listings of all sites with size info
  • wait for background tasks to all complete
@detain
detain / gh-pages-tips.md
Created Aug 30, 2019 — forked from jedschneider/gh-pages-tips.md
github pages tips for jekyll wiki
View gh-pages-tips.md

Working With Github Pages

The FAQ maintained by Github covers most stumbling blocks, some other tips and tricks supplied here.

Gitignore

Add _site to .gitignore. The generated site should not be uploaded to Github since its gets generated by github.

Working With Code Partials

View tglinks.html
View index.html
<div id="textOutput" style="white-space: pre;">//////////////////////////////////////////////////////////*///**////////////////////////////////////////////////////////////////////////////////////////////////////////////*/**********************************************************************... ..****....*******.*************************************... . . ......<br>//////////////////////////////////////////**////******///*********//////////////////////////////////////////////////////////////////////////////////*////////////////////*///*****/************************************************************. . .... ..*..........*********************************************......... .............<br>/////////////////////////////////////////***////*******///*******///////////////////////////////////////////////////////////////////////////////////*/////////////////**///*///*///***********************************************************.. .... .***........*********************************
View rebuild_svn_history.sh
#!/bin/bash
#rm -rf /var/lib/submin/svn/cisco_parser; cp -a cisco_parser /var/lib/submin/svn/ ; submin2-admin /var/lib/submin unixperms fix
read -p "username:password for svn repo" CURLAUTH
#export CURLAUTH="username:password"
IFS="
"
set -x
for file in *cisco.php; do
for rev in $(svn log "$file" |grep -A1 -- "----------------" |grep "^r"| cut -d" " -f1 | cut -c2-); do
echo "$file $rev";
@detain
detain / convert_db_to_utf8.sh
Created Aug 9, 2018
converts mysql data to character set utf8mb4 set / collation utf8mb4_unicode_ci
View convert_db_to_utf8.sh
#!/bin/bash
function make_mysql_utf8_convert() {
db="$1"
echo "SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci, COLLATION_CONNECTION = utf8mb4_unicode_ci, COLLATION_DATABASE = utf8mb4_unicode_ci, COLLATION_SERVER = utf8mb4_unicode_ci;" > update_utf8.sql;
echo "SET FOREIGN_KEY_CHECKS=0;" >> update_utf8.sql;
echo "ALTER DATABASE ${db} CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;" >> update_utf8.sql;
for t in $(echo "show table status where Engine IS NOT NULL;" | mysql -s "${db}"| awk '{ print $7 " " $1 }' |sort -n | awk '{ print $2 }'); do
echo "ALTER TABLE ${t} CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci$(mysqldump -d "${db}" "$t" | grep "^ *\`"| \
grep -i -E -e "\` (varchar|mediumtext|text|char)" | \
View index.html
<dashboard class="dashboard">
<dashboard-header title="Teb-2 DataCenter">
<dashboard-clock digital="true" binary="true" />
</dashboard-header>
<server-list>
<server v-for="(server, index) in servers" :class="{ 'has-failed': !server.status }" :type="server.type" @click.native="updateServerStatus(index)">
<span slot="name" class="data">{{server.name}}</span>
<span slot="status" class="data signal">{{server.status ? 'ONLINE' : 'OFFLINE'}}</span>
<span slot="adr" class="data">{{server.adr}}</span>
</server>
@detain
detain / generate_chown_fix.sh
Created Dec 22, 2016
Read all files in /etc and generate chown lines for them using the current owner/group (for use on another server whos ownership got messed up):
View generate_chown_fix.sh
find /etc|xargs -n 1 stat -c "chown %U.%G %n;"
@detain
detain / Interactive Customer Feedback Form (For a pet store).markdown
Created Jan 9, 2016
Interactive Customer Feedback Form (For a pet store)
View Interactive Customer Feedback Form (For a pet store).markdown
You can’t perform that action at this time.