Skip to content

Instantly share code, notes, and snippets.

View rkennesson's full-sized avatar
:octocat:
I may be slow to respond.

Richard Kennesson rkennesson

:octocat:
I may be slow to respond.
View GitHub Profile
@mpkocher
mpkocher / walrus_fstring_example.py
Last active May 9, 2020 21:35
Exploring Py 3.8 Walrus + F-string Tweet By Raymond Hettinger
#!/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
@basrieter
basrieter / latest-widevine.sh
Created July 31, 2018 07:37 — forked from ruario/intro-latest-widevine.md
Fetches the latest Linux Widevine binary so that it can be used by Vivaldi.
#!/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"
@jerodg
jerodg / windows_and_office_kms_setup.adoc
Last active July 24, 2024 00:15
Activate Windows and Office Using KMS Server

Microsoft Windows and Office KMS Setup

@darrenpmeyer
darrenpmeyer / open-vm-tools-vmware-ubuntu-sharing.md
Last active June 18, 2024 08:16
open-vm-tools and VMWare Shared Folders for Ubuntu guests

(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.

TL;DR

Install open-vm-tools and run:

sudo mount -t fuse.vmhgfs-fuse .host:/ /mnt/hgfs -o allow_other
@maxux
maxux / sysinfo.sh
Last active December 9, 2018 20:32
#!/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 ---"
@adeekshith
adeekshith / .git-commit-template.txt
Last active July 15, 2024 16:40 — forked from Linell/.git-commit-template.txt
This commit message template helps you write great commit messages and enforce it across teams.
# <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
@vincenthsu
vincenthsu / .clang-format
Created January 12, 2016 08:31
clang-format example
---
Language: Cpp
# BasedOnStyle: WebKit
AccessModifierOffset: -4
AlignAfterOpenBracket: false
AlignEscapedNewlinesLeft: false
AlignOperands: false
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
@chrismdp
chrismdp / s3.sh
Last active July 23, 2024 16:47
Uploading to S3 in 18 lines of Shell (used to upload builds for http://soltrader.net)
# 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
@JamesMGreene
JamesMGreene / gitflow-breakdown.md
Last active July 19, 2024 01:24
`git flow` vs. `git`: A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository