Skip to content

Instantly share code, notes, and snippets.

@dantheman213
dantheman213 / mediamove.js
Last active April 26, 2016 01:49
Move media files in a downloads directory using a "grep-like" selector that will copy all target files to the desired media location. This script was designed to easily move many files using a single grep selector quickly to another folder via the command-line.
#!/usr/bin/nodejs
// Easily copy and sync media from downloads area to target location
//
// Daniel Gillespie
// 2016
//
// Install required packages where you're placing script
// npm install --save prompt-sync chalk exec-sync rsync
//
@dantheman213
dantheman213 / gist:6213ca5b2df4f70205ec
Created March 26, 2016 18:54
vagrant reverse proxy port for node js debug
vagrant ssh -- -L 5858:127.0.0.1:5858
@dantheman213
dantheman213 / showrss_downloader.js
Last active July 15, 2021 11:02
showRSS scheduler rss feed parse and download magent link files for your personal showRSS RSS URL
// showRSS scheduler rss feed parse and download magent link files for your personal showRSS RSS URL
// HOW TO USE //
// 1. Setup showRss Feed and get a personal URL
// 2. Setup a torrent downloader (I like Deluge) and have it watch a folder to auto-add torrent_files
// 3. Cron to setup
// * 23 * * * nodejs /usr/bin/showrss_downloader.js >> /var/log/showrss_downloader.log 2>&1
@dantheman213
dantheman213 / export_db_structure.sh
Last active March 5, 2024 02:55
Batch backup and export your Postgres or PostgreSQL table schemas and stored functions or procedures into individual *.sql files --the easy way!
#!/bin/sh
# AUTHOR
# DANIEL E. GILLESPIE (2016)
# https://github.com/dantheman213
# DESCRIPTION
# Export your app's table schemas and stored functions from a PostgreSQL
# database into individual *.sql files for easy management and source control.
@dantheman213
dantheman213 / import_db_structure.sh
Last active April 19, 2022 13:12
Batch import all *.sql files in a folder recursively into your Postgres or PostgreSQL database
#!/bin/sh
# AUTHOR
# DANIEL E. GILLESPIE (2016)
# https://github.com/dantheman213
# DESCRIPTION
# Import all *.sql files in a folder recuresively into your PostgreSQL database
# Batch export all table schemas and stored functions with this script located here:
@dantheman213
dantheman213 / PostgresFunctionsCheatsheetReadme.md
Last active January 11, 2022 18:15
PostgreSQL & PL/pgSQL Stored Functions Cheatsheet

PostgreSQL & PL/pgSQL Stored Functions Cheatsheet

Boiler-plate stored function

CREATE OR REPLACE FUNCTION public.sp_user_ins_status(status smallint)
  RETURNS integer
  LANGUAGE plpgsql
AS $function$
@dantheman213
dantheman213 / Three Wise Monkeys.md
Created January 20, 2017 21:50 — forked from malarkey/Three Wise Monkeys.md
Three Wise Monkeys (NDA)

Date: [date]

Between us [company name] and you [customer name].

Summary:

In short; neither of us will share any confidential information about each-other, by any means, with anyone else.

What’s confidential information?

@dantheman213
dantheman213 / your_nodejs_app.conf
Last active February 4, 2017 00:19
NodeJS 'Upstart' Start-up script. Works on Ubuntu 14.04.
#!upstart
# NodeJS 'Upstart' Start-up script.
# Works on Ubuntu 14.04. Systemd is being used for Ubuntu 16.04 though.
description "your node js web app"
start on started mountall
stop on shutdown
@dantheman213
dantheman213 / pacman-cheatsheet.md
Last active December 4, 2018 08:24
Pacman Package Manager Cheatsheet

Pacman Cheatsheet

Update and upgrade all

pacman -Syu

Install specific package

pacman -S 
@dantheman213
dantheman213 / install-deepin-arch-manjaro-readme.md
Last active November 19, 2023 01:20
Install Deepin Desktop Environment from a minimum Arch or Manjaro Install Operating System

Install Deepin Desktop Environment In Arch or Manjaro

I recommend doing this as a net/minimum install with Manjaro (no desktop manager attached with the install).

Update sources & packages

pacman -Syu
reboot -h now