Skip to content

Instantly share code, notes, and snippets.

View jtmoon79's full-sized avatar
πŸ’­
πŸ˜‡

James Thomas Moon jtmoon79

πŸ’­
πŸ˜‡
View GitHub Profile
@jtmoon79
jtmoon79 / python-embedded-for-Win10.md
Last active April 16, 2025 01:38
fully configuring embedded Python on Windows 10

Update: use PowerShell script PythonEmbed4Win.ps1.

The instructions in this gist have some subtle problems and this gist will not be updated.

About


@jtmoon79
jtmoon79 / glances-start.sh
Last active October 26, 2022 02:33
start glances, single instance, user glances
#!/usr/bin/env bash
#
# run single instance of glances on the system as user glances.
# follows from https://gist.github.com/jtmoon79/1b5a806b3e71874542c21b1578156a42
# designed for a Debian-based Linux
#
# place this file at /var/lib/glances/glances-start.sh
# chmod +x /var/lib/glances/glances-start.sh
# should look like:
# ls -l /var/lib/glances/glances-start.sh
@jtmoon79
jtmoon79 / glances-install.sh
Last active October 26, 2022 02:23
install glances system monitor on a Debian system
#!/usr/bin/env bash
#
# install glances system monitor onto a Debian-based System under user "glances"
# https://github.com/nicolargo/glances
#
# This creates user "glances" (which glances presumes to do) but for the purpose of install the program glances (and the
# required libraries) under permissions of user glances. This way,
# - glances programs are slightly better contained under user glances permissions
# - glances (and related programs) are not added to shared $PATH directories
#
@xCONFLiCTiONx
xCONFLiCTiONx / Notepad3.ini
Last active June 1, 2023 00:04
Notepad3 VSCode Dark Theme (import)
[Custom Colors]
01=#000000
02=#B5E2F5
03=#A2C5D4
04=#89ACEC
05=#006633
06=#B2D766
07=#648000
08=#F6B05B
09=#FFFFFF
@paolocarrasco
paolocarrasco / README.md
Last active April 7, 2025 22:13
How to understand the `gpg failed to sign the data` problem in git

Problem

You have installed GPG, then tried to commit and suddenly you see this error message after it:

error: gpg failed to sign the data
fatal: failed to write commit object

Debug

@dentechy
dentechy / WSL-ssh-server.md
Last active April 23, 2025 15:00
A step by step tutorial on how to automatically start ssh server on boot on the Windows Subsystem for Linux

How to automatically start ssh server on boot on Windows Subsystem for Linux

Microsoft partnered with Canonical to create Bash on Ubuntu on Windows, running through a technology called the Windows Subsystem for Linux. Below are instructions on how to set up the ssh server to run automatically at boot.

  1. Edit the /etc/ssh/sshd_config file by running the command sudo vi /etc/ssh/sshd_config and do the following
    1. Change Port to 2222 (or any other port above 1000)
    2. Change PasswordAuthentication to yes. This can be changed back to no if ssh keys are setup.
  2. Restart the ssh server:
    • sudo service ssh --full-restart
  3. With this setup, the ssh server must be turned on every time you run Bash on Ubuntu on Windows, as by default it is off. Use this command to turn it on:
@Aikhjarto
Aikhjarto / DD_WRT_nvram_tricks.txt
Last active March 30, 2025 02:52
DD-WRT nvram tricks
This file provides some nifty command-line tools around DD-WRT's nvram command.
https://www.dd-wrt.com/wiki/index.php/Hardware#NVRAM
USE WITH CAUTION: fiddling with nvram can wipe your settings and you may loose access to your router.
Hint 1: Different version of DD-WRT might use different nvram variables. Thus, be carefull when updating.
Hint 2: The commands listed below should be issued via a ssh-connection since the webinterface for issuing commands might time out for the longer commands.
Background
==========
Extracting the content of configuration variables with nvram would provide an easy way of selective backup/restore of settings. However, listing the content of the nvram via
nvram show
@Robbepop
Robbepop / .rustfmt.toml
Created March 16, 2017 18:19
.rustfmt.toml with all configs, descriptions, parameters and defaults for version 0.7.1 of rustfmt.
# ----------------------------------------------------------------------------------
# r u s t f m t - C O N F I G
# ==================================================================================
#
# Version: 0.7.1
# Author : Robbepop <[email protected]>
#
# A predefined .rustfmt.toml file with all configuration options and their
# associated description, possible values and default values for use in other
# projects.
@mlocati
mlocati / win10colors.cmd
Last active March 17, 2025 20:23
ANSI Colors in standard Windows 10 shell
@echo off
setlocal
call :setESC
cls
echo %ESC%[101;93m STYLES %ESC%[0m
echo ^<ESC^>[0m %ESC%[0mReset%ESC%[0m
echo ^<ESC^>[1m %ESC%[1mBold%ESC%[0m
echo ^<ESC^>[4m %ESC%[4mUnderline%ESC%[0m
@CreaoticX
CreaoticX / us_state_abbreviations.py
Last active April 21, 2019 21:18 — forked from JeffPaine/us_state_abbreviations.py
A python list of all US state abbreviations.
states = ["AL", "AK", "AZ", "AR", "CA", "CO", "CT", "DC", "DE", "FL", "GA",
"HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD",
"MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ",
"NM", "NY", "NC", "ND", "OH", "OK", "OR", "PA", "RI", "SC",
"SD", "TN", "TX", "UT", "VT", "VA", "WA", "WV", "WI", "WY"]
STATES = {"AL":"Alabama",
"AK":"Alaska",
"AZ":"Arizona",
"AR":"Arkansas",
"CA":"California",