Skip to content

Instantly share code, notes, and snippets.

View bardic's full-sized avatar

TJ Gillis bardic

View GitHub Profile
@bardic
bardic / create_certs.sh
Created August 12, 2023 18:40
How I use docker and a simple shell script to renew my ssl certs. Nginx docker and site.conf example of how certs are processed and saved
#!/bin/bash
docker-compose -f ../certbot/docker-compose.yml --env-file ../certbot/openbracket.ca.env up
docker-compose -f ../certbot/docker-compose.yml --env-file ../certbot/pass.openbracket.ca.env up
docker-compose -f ../certbot/docker-compose.yml --env-file ../certbot/social.openbracket.ca.env up
docker-compose -f ../certbot/docker-compose.yml --env-file ../certbot/git.openbracket.ca.env up
docker-compose -f ../certbot/docker-compose.yml --env-file ../certbot/design.openbracket.ca.env up
@bardic
bardic / tidy.sh
Created August 12, 2023 18:18
Simple shell script to loop through your go.work and tidy the known modules
#!/bin/sh
ROOT=`pwd`
while read p; do
all=$(echo $p)
first=${all%% *}
if [[ $first == "use" ]]; then
last=${all##* }
cd $last
@bardic
bardic / run.sh
Created May 22, 2023 17:33
Example of how I use jq to parse some json for script commands and details
#!/bin/sh
############
#
# Functions
#
###########
function exit_with_help {
echo \
router
.get('/cat', (ctx, next) => {
ctx.body = "Hello"
r.table('authors').run(connection, function(err, cursor) {
if (err) throw err;
cursor.toArray(function(err, result) {
if (err) throw err
console.log(ctx)
//THIS PART DOESN'T WORK
ctx.body += result[0].name
#!/bin/bash
for f in ./posts/*.md;do
echo "Processing $f file..."
IFS='/' read -r -a array <<< "$f"
# take ~action on each file. $f store current file name
echo ${array[2]}
FNAME=${array[2]}
CLEANNAME=${FNAME:0:9}
echo "cat $CLEANNAME"
mkdir "./posts/$CLEANNAME"
npm_new_phaser() {
if [ "$1" != "" ]
then
mkdir "$1"
cd "$1"
if ! type nvm > /dev/null; then
echo "Insatll NVM. I'm not doing it for you since you need shell integration"
echo "https://github.com/creationix/nvm"
return 1
npm_new() {
if [ "$1" != "" ]
then
mkdir "$1"
cd "$1"
if ! type nvm > /dev/null; then
echo "Insatll NVM. I'm not doing it for you since you need shell integration"
echo "https://github.com/creationix/nvm"
return 1
2015-09-09 19:07:39 INFO SEARCHQUEUE-MANUAL-214831 :: [IPTorrents] :: Unable to find a download for: [Face Off - 9x07 - All That Glitters]
2015-09-09 19:07:39 WARNING SEARCHQUEUE-MANUAL-214831 :: [IPTorrents] :: No NZB/Torrent providers found or enabled in the sickrage config for backlog searches. Please check your settings.
AA
AAAttributeError: 'NoneType' object has no attribute 'text'
AA if re.search('tries left', response.text) \
AA File "/Users/*********/Sickrage/sickbeard/providers/iptorrents.py", line 99, in _doLogin
AA if not self._doLogin():
AA File "/Users/*********/Sickrage/sickbeard/providers/iptorrents.py", line 337, in _doSearch
AA itemList += self._doSearch(curString, 'eponly', len(episodes))
AA File "/Users/*********/Sickrage/sickbeard/providers/iptorrents.py", line 167, in findSearchResults
2015-08-12 17:55:34 INFO SEARCHQUEUE-MANUAL-214831 :: [IPTorrents] :: Ignoring result Face.Off.S09E01.Intergalactic.Zoo.XviD-AFG because we don't want an episode that is Unknown
2015-08-12 17:55:33 INFO SEARCHQUEUE-MANUAL-214831 :: [IPTorrents] :: Ignoring result Face.Off.S09E01.Intergalactic.Zoo.480p.x264-mSD because we don't want an episode that is Unknown
2015-08-12 17:55:33 INFO SEARCHQUEUE-MANUAL-214831 :: [IPTorrents] :: Ignoring result Face.Off.S09E01.Intergalactic.Zoo.HDTV.x264-W4F because we don't want an episode that is SDTV
2015-08-12 17:55:33 INFO SEARCHQUEUE-MANUAL-214831 :: [IPTorrents] :: Ignoring result Face.Off.S09E01.Intergalactic.Zoo.HDTV.x264-FUM because we don't want an episode that is SDTV
2015-08-12 17:55:33 INFO SEARCHQUEUE-MANUAL-214831 :: [IPTorrents] :: Ignoring result Face.Off.S09E01.Intergalactic.Zoo.720p.HDTV.x264-DHD because we don't want an episode that is HDTV
2015-08-12 17:55:32 INFO SEARCHQUEUE-MANUAL-214831 :: [IPTorrents] :: Performing episode searc
2015-06-30 22:54:35 POSTPROCESSER :: Failed Unrar archive orange.is.the.new.black.s03e09.webrip.x264-qcf.part01.rar: No suitable RAR unpacker installed
2015-06-30 22:54:34 POSTPROCESSER :: Failed Unrar archive mozart.in.the.jungle.s01e04.720p.webrip.x264-failed.rar: No suitable RAR unpacker installed
2015-06-30 22:54:34 POSTPROCESSER :: Failed Unrar archive mozart.in.the.jungle.s01e05.proper.720p.webrip.x264-batv.rar: No suitable RAR unpacker installed
2015-06-30 22:54:34 POSTPROCESSER :: Failed Unrar archive mozart.in.the.jungle.s01e06.proper.720p.webrip.x264-batv.rar: No suitable RAR unpacker installed
2015-06-30 22:54:34 POSTPROCESSER :: Failed Unrar archive mozart.in.the.jungle.s01e07.proper.720p.webrip.x264-batv.rar: No suitable RAR unpacker installed
2015-06-30 22:54:34 POSTPROCESSER :: Failed Unrar archive mozart.in.the.jungle.s01e10.proper.720p.webrip.x264-batv.rar: No suitable RAR unpacker installed
2015-06-30 22:54:34 POSTPROCESSER :: Failed Unrar archive once.upon.a.time.42223.hdtv-lol.rar: No suit