A fully fonctional and good-looking linux for less than 256mb of ram
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 python3 | |
""" | |
Requires Python 3.8 | |
Expanding on a Tweet from RH using walrus and f-strings | |
https://twitter.com/raymondh/status/1153085050650423296 | |
""" | |
import logging |
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 bash | |
available () { | |
command -v $1 >/dev/null 2>&1 | |
} | |
# Make sure we have wget or curl | |
if available wget; then | |
SILENT_DL="wget -qO-" | |
LOUD_DL="wget" |
(NB: adapted from this Ask Ubuntu thread -- tested to work on Ubuntu 16.04 LTS through Ubuntu 22.04 LTS (Jammy).
Unlike using VMWare Tools to enable Linux guest capabilities, the open-vm-tools
package doesn't auto-mount shared VMWare folders. This can be frustrating in various ways, but there's an easy fix.
Install open-vm-tools
and run:
sudo mount -t fuse.vmhgfs-fuse .host:/ /mnt/hgfs -o allow_other
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 | |
cpu_model=$(grep 'model name' /proc/cpuinfo | awk -F': ' '{ print $2 }' | head -1) | |
cpu_count=$(grep 'model name' /proc/cpuinfo | awk -F': ' '{ print $2 }' | wc -l) | |
cpu_socket=$(lscpu -p=SOCKET | grep -v '^#' | sort -u | wc -l) | |
echo "==================================" | |
echo "== $(hostname)" | |
echo "==================================" | |
echo "" | |
echo "--- CPU ---" |
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
# <type>: (If applied, this commit will...) <subject> (Max 50 char) | |
# |<---- Using a Maximum Of 50 Characters ---->| | |
# Explain why this change is being made | |
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->| | |
# Provide links or keys to any relevant tickets, articles or other resources | |
# Example: Github issue #23 |
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
--- | |
Language: Cpp | |
# BasedOnStyle: WebKit | |
AccessModifierOffset: -4 | |
AlignAfterOpenBracket: false | |
AlignEscapedNewlinesLeft: false | |
AlignOperands: false | |
AlignTrailingComments: true | |
AllowAllParametersOfDeclarationOnNextLine: false | |
AllowShortBlocksOnASingleLine: false |
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
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine | |
# This is how I upload my new Sol Trader builds (http://soltrader.net) | |
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash | |
S3KEY="my aws key" | |
S3SECRET="my aws secret" # pass these in | |
function putS3 | |
{ | |
path=$1 |
NewerOlder