Skip to content

Instantly share code, notes, and snippets.

View DerekNonGeneric's full-sized avatar

Derek Lewis DerekNonGeneric

View GitHub Profile
@DerekNonGeneric
DerekNonGeneric / Correct_GnuPG_Permission.sh
Created November 3, 2022 06:27 — forked from oseme-techguy/Correct_GnuPG_Permission.sh
This fixes the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error while using Gnupg .
#!/usr/bin/env bash
# To fix the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error
# Make sure that the .gnupg directory and its contents is accessibile by your user.
chown -R $(whoami) ~/.gnupg/
# Also correct the permissions and access rights on the directory
chmod 600 ~/.gnupg/*
chmod 700 ~/.gnupg
@DerekNonGeneric
DerekNonGeneric / README.md
Created October 15, 2022 07:20 — forked from dogancelik/README.md
Download all tarballs of an NPM package #npm

Download all tarballs of an NPM package

I will list the methods you can download npm tarballs.

curl + jq + wget

curl -s https://registry.npmjs.org/del | jq -r .versions[].dist.tarball | wget -i -
@DerekNonGeneric
DerekNonGeneric / bash-colors.md
Created February 9, 2022 03:54 — forked from AHaymond/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
@DerekNonGeneric
DerekNonGeneric / package.json
Created June 28, 2017 12:08 — forked from addyosmani/package.json
npm run-scripts boilerplate
{
"name": "my-app",
"version": "1.0.0",
"description": "My test app",
"main": "src/js/index.js",
"scripts": {
"jshint:dist": "jshint src/js/*.js",
"jshint": "npm run jshint:dist",
"jscs": "jscs src/*.js",
"browserify": "browserify -s Validating -o ./dist/js/build.js ./lib/index.js",
@DerekNonGeneric
DerekNonGeneric / download-site.md
Created May 24, 2016 23:06 — forked from pmeinhardt/download-site.md
download an entire page (including css, js, images) for offline-reading, archiving… using wget

If you ever need to download an entire website, perhaps for off-line viewing, wget can do the job — for example:

$ wget --recursive --no-clobber --page-requisites --html-extension --convert-links --restrict-file-names=windows --domains website.org --no-parent  www.website.org/tutorials/html/

This command downloads the website www.website.org/tutorials/html/.

The options are:

  • --recursive: download the entire website
  • --domains website.org: don't follow links outside website.org
var COMPILED=!0,goog=goog||{};goog.global=this;goog.isDef=function(a){return void 0!==a};goog.exportPath_=function(a,b,c){a=a.split(".");c=c||goog.global;a[0]in c||!c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)!a.length&&goog.isDef(b)?c[d]=b:c=c[d]?c[d]:c[d]={}};
goog.define=function(a,b){var c=b;COMPILED||(goog.global.CLOSURE_UNCOMPILED_DEFINES&&Object.prototype.hasOwnProperty.call(goog.global.CLOSURE_UNCOMPILED_DEFINES,a)?c=goog.global.CLOSURE_UNCOMPILED_DEFINES[a]:goog.global.CLOSURE_DEFINES&&Object.prototype.hasOwnProperty.call(goog.global.CLOSURE_DEFINES,a)&&(c=goog.global.CLOSURE_DEFINES[a]));goog.exportPath_(a,c)};goog.DEBUG=!0;goog.LOCALE="en";goog.TRUSTED_SITE=!0;goog.STRICT_MODE_COMPATIBLE=!1;goog.DISALLOW_TEST_ONLY_CODE=COMPILED&&!goog.DEBUG;
goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING=!1;goog.provide=function(a){if(!COMPILED&&goog.isProvided_(a))throw Error('Namespace "'+a+'" already declared.');goog.constructNamespace_(a)};goog.constructNamespace_=function(a,b){if(!CO
@DerekNonGeneric
DerekNonGeneric / cgi-apache-mac.md
Created March 20, 2016 04:48
Run CGI scripts within the user-level document root of an Apache webserver on Mac OS X 10.11 El Capitan

Run CGI scripts within the user-level document root of an Apache webserver on Mac OS X 10.11 El Capitan

  1. Download and install Sublime Text if you haven't already

  2. Launch Terminal, (Applications/Utilities), and follow the commands below

  3. Create a symlink to subl in /usr/local/bin/

    ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/sublime