This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#https://stackoverflow.com/a/56723462/3697224 | |
node -e "const pk = JSON.parse(require('fs').readFileSync('package.json', 'utf-8'));require('child_process').spawn('npm', ['install', ...Object.keys(Object.assign({},pk.dependencies, pk.devDependencies)).map(a=>a+'@latest')]).stdout.on('data', d=>console.log(d.toString()))" | |
# Simple Bash Script | |
for package in $(npm outdated | tail -n+2 | awk '{print $1"@"$4}'); do npm i $package; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get ssh configuration to find port | |
podman system connection ls | |
# Create ssh tunnel [PORT] found in the above command | |
ssh -nNT -L/tmp/podman.sock:/run/user/1000/podman/podman.sock -i ~/.ssh/podman-machine-default ssh://core@localhost:[PORT] | |
# Export socket location for docker-compose | |
export DOCKER_HOST='unix:///tmp/podman.sock' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#RESIZE SDCARD IMAGE | |
# $ fdisk -l img/2021-05-07-raspios-buster-armhf-lite.img | |
# Disk img/2021-05-07-raspios-buster-armhf-lite.img: 1.76 GiB, 1874853888 bytes, 3661824 sectors | |
# Units: sectors of 1 * 512 = 512 bytes | |
# Sector size (logical/physical): 512 bytes / 512 bytes | |
# I/O size (minimum/optimal): 512 bytes / 512 bytes | |
# Disklabel type: dos | |
# Disk identifier: 0x9730496b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from __future__ import print_function | |
import os | |
import sys | |
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer, test as _test | |
import subprocess | |
from SocketServer import ThreadingMixIn | |
import argparse | |
import base64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# WARNING: CPU MINING IS UNPROFITABLE! (FOR HOBBY / EXPERIMENT / RESEARCH ONLY) | |
# | |
# RASPBERRY PI CPUMINER-MULTI SETUP SCRIPT | |
# | |
# RASPBERRY PI, DOGE, DOGECOIN, PROHASHING.COM, LITECOIN, MINING | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example error: wp_postmeta: 21 clients are using or haven't closed the table properly | |
# Login to mysql | |
$ mysql -u<username> -p <database name> | |
CHECK TABLE wordpress_postmeta ; | |
--- ERROR: myisamchk: error: Not enough memory for blob at 94358800 <<< Fix for this error below!! | |
REPAIR TABLE wordpress_postmeta; | |
CHECK TABLE wordpress_postmeta ; | |
# How to fix 'Not enough memory for blob at blah blah blah' on wordpress table: wordpress_postmeta? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# !!! IMPORTANT | |
# Must point to the correct director or this entire script breaks | |
eval $(/opt/homebrew/bin/brew shellenv) | |
# The next line updates PATH for the Google Cloud SDK. | |
if [ -f '/usr/local/google-cloud-sdk/path.bash.inc' ]; then . '/usr/local/google-cloud-sdk/path.bash.inc'; fi | |
# The next line enables shell command completion for gcloud. | |
if [ -f '/usr/local/google-cloud-sdk/completion.bash.inc' ]; then . '/usr/local/google-cloud-sdk/completion.bash.inc'; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/home/ampcare/htdocs/wp-content/plugins/learndash-notifications/includes/shortcode.php | |
# Line number: 106 | |
if ( ! empty( $timezone_string = get_option( 'timezone_string' ) ) ) { | |
date_default_timezone_set( $timezone_string ); | |
} | |
#$result = date_i18n( $atts['format'], $completed_on ); | |
if ( ! empty( $timezone_string ) ) { | |
$result = new DateTime( "@$completed_on" ); | |
$result = date_timezone_set($result, timezone_open( $timezone_string ) ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<some cmd> | (sed -u 1q; sort -k8) --- Sort by 8th column while skipping header | |
tput rmam --- Remove line wrap in terminal | |
tput smam --- Add line wrapping |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
network is not ready: runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: Kubenet does not have netConfig. This is most likely due to lack of PodCIDR |