Skip to content

Instantly share code, notes, and snippets.

View jpgninja's full-sized avatar
🎯
Got a ton of interesting projects going on, and loving it.

Chris Mewhort jpgninja

🎯
Got a ton of interesting projects going on, and loving it.
View GitHub Profile
@jpgninja
jpgninja / package-commands.md
Last active January 3, 2024 23:13
Common apps, bins & packages to use spinning up a new box.

Common apps, bins & packages

This gist is maintained for whenever I start fresh on a new OS. It's comprised of one-liners that I can copy-paste into a terminal and rapidly spin up my needed apps.

Fresh Install

  • Casks: brew install --cask slack sublime-text transmission dropbox cyberghost-vpn spotify vlc signal whatsapp telegram google-chrome exodus skype sequel-pro brave-browser screaming-frog-seo-spider lulu mamp discord iterm2 omnidisksweeper visual-studio-code megasync yacreader transmit disk-inventory-x notion
  • Bottles: brew install nvm node weechat tor wget git wp-cli mysql composer yt-dlp ffmpeg rar mpv aria2c tree
  • Global npm packages: npm install -g peerflix js-beautify
@jpgninja
jpgninja / weechat-config.md
Last active May 8, 2023 18:41
My customizations on Pascale's "always" up to date Weechat Config

Tor

/proxy add tor socks5 127.0.0.1 9050
/server add libera-tor libera75jm6of4wxpxt4aynol3xjmbtxgfyjpu34ss4d7r7q2v5zrpyd.onion/6697
/set irc.server.libera-tor.addresses libera75jm6of4wxpxt4aynol3xjmbtxgfyjpu34ss4d7r7q2v5zrpyd.onion/6697
/set irc.server.libera-tor.proxy tor
/set irc.server.libera-tor.ssl on
/set irc.server.libera-tor.ssl_cert /path/to/libera-tor.pem
/set irc.server.libera-tor.sasl_mechanism external
@jpgninja
jpgninja / bulk-domain-authority-checker.js
Last active January 16, 2022 14:47
Bulk DA Checker Bookmarklet
/*
* Grabs DA, PA, and MozRank from https://www.robingupta.com/bulk-domain-authority-checker.html
*/
let stats_str = [];
let stats = [];
let out = "";
stats_str = [];
stats = [];
/* Breakpoints */
/* ------------------------- Source: http://blog.scur.pl/2012/06/variable-media-queries-less-css/ */
@highdensity: ~"only screen and (-webkit-min-device-pixel-ratio: 1.5)",
~"only screen and (min--moz-device-pixel-ratio: 1.5)",
~"only screen and (-o-min-device-pixel-ratio: 3/2)",
~"only screen and (min-device-pixel-ratio: 1.5)";
@mobile: ~"only screen and (max-width: 529px)";
@tablet: ~"only screen and (min-width: 530px) and (max-width: 949px)";
@desktop: ~"only screen and (min-width: 950px) and (max-width: 1128px)";
@desktop-xl: ~"only screen and (min-width: 1129px)";
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# JWT Auth.
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1]
# App setup.
RewriteCond %(REQUEST_FILENAME) !-f
/**
* Process profile edit submissions.
*/
function process_edit_profile_submission() {
// Verify nonce, redirect, and exit.
$bad_nonce = ( ! isset( $_POST['cc_profile_edit_nonce'] ) || ! wp_verify_nonce( sanitize_key( $_POST['cc_profile_edit_nonce'] ), 'cc_profile_edit' ) );
if ( $bad_nonce ) {
// Flash error message.
$flash_msg = [
const axios = require('axios');
const cheerio = require('cheerio');
/**
* Checks if a proxy is accessible.
*
* @param host Host of the proxy
* @param port Port of the proxy
*/
var stop = function(host, port, options, callback) {
@jpgninja
jpgninja / wp_vuln_scan.sh
Last active May 17, 2019 21:19
Bash commands to look for potential vulnerabilities - Currently being copy-pasted to bootstrap code audits for WordPress plugins
# Bash script to scan PHP files for potential vulnerabilities
#
# Currently being copy-pasted to bootstrap code audits for WordPress plugins
#
# Based off of @dustyfresh's https://github.com/dustyfresh/PHP-vulnerability-audit-cheatsheet
#
# XSS
clear && \