Skip to content

Instantly share code, notes, and snippets.

View mick-t's full-sized avatar
🎯
Compiling https://www.xkcd.com/303/

Mick T. mick-t

🎯
Compiling https://www.xkcd.com/303/
View GitHub Profile
@bhrutledge
bhrutledge / django-tutorials.md
Last active December 12, 2023 16:34
My thoughts on Django tutorials

Django Tutorials

I've scanned through these, and they all seem to cover the basic features of Django (models, function-based views, forms, templates, CSS, and the admin interface), and use Python 3 and Django 2. My notes indicate what I think differentiates them.

Django Girls tutorial

  • Written for Django Girls workshops or self-teaching
  • Widely recommended for beginners, even to Python, web development, and command line
  • Build a blog
  • Instructions for Windows, Mac, and Linux (including Python installation)
@judge2020
judge2020 / cloudflare-ips-v4.txt
Last active September 26, 2023 19:56
Cloudflare comma-separated IPs
103.21.244.0/22,103.22.200.0/22,103.31.4.0/22,104.16.0.0/12,108.162.192.0/18,131.0.72.0/22,141.101.64.0/18,162.158.0.0/15,172.64.0.0/13,173.245.48.0/20,188.114.96.0/20,190.93.240.0/20,197.234.240.0/22,198.41.128.0/17
@aleksbelic
aleksbelic / yum2csv.sh
Last active August 11, 2023 14:31
Yum list installed to CSV
yum list installed | awk '{print $1";"$2";"$3}' > /home/list_installed.csv
yum list available | awk '{print $1";"$2";"$3}' > /home/list_available.csv
yum check-update | awk '{print $1";"$2";"$3}' > /home/check_update.csv
@Brainiarc7
Brainiarc7 / skylake-tuning-linux.md
Last active October 5, 2025 15:02
This gist will show you how to tune your Intel-based Skylake, Kabylake and beyond Integrated Graphics Core for performance and reliability through GuC and HuC firmware usage on Linux.

Tuning Intel Skylake and beyond for optimal performance and feature level support on Linux:

Note that on Skylake, Kabylake (and the now cancelled "Broxton") SKUs, functionality such as power saving, GPU scheduling and HDMI audio have been moved onto binary-only firmware, and as such, the GuC and the HuC blobs must be loaded at run-time to access this functionality.

Enabling GuC and HuC on Skylake and above requires a few extra parameters be passed to the kernel before boot.

Instructions provided for both Fedora and Ubuntu (including Debian):

Note that the firmware for these GPUs is often packaged by your distributor, and as such, you can confirm the firmware blob's availability by running:

# HB Rclone destination
#
# Rclone is a program that syncs local directories to various cloud
# services. The Rclone project is at: http://rclone.org
#
# HashBackup supports shell destinations to interface to storage
# systems that are not natively supported in HashBackup. If there is
# native support for a destination, it should always be preferred over
# a shell destination.
#
@miticojo
miticojo / ipa_mail_passexpiration.sh
Created June 23, 2016 05:41
send email for password expiration
#!/bin/bash
# Source: http://vmhacks.com/freeipa-password-expiry-notification-script-for-red-hat-identity-management/
# notifies people a set number of days before expiry, once via email
# open a kerberos ticket using keytab authentication
# the following keytab file was made using ktutil with rc4-hmac
/usr/bin/kinit [email protected] -k -t /sextoys/admin.keytab
@martyngigg
martyngigg / setup.md
Created December 15, 2015 12:53
VirtualGL and NoMachine
#!/bin/bash
#!/bin/sh -x ## or just ` curl -Ls http://git.io/vRozn | sh `.
## Downloads the Mac OS X 10.10 Recovery Partition update,
## Copy's over the 10.10 version of Disk Utility.app, then
## use git to apply a binary patch so it will run on 10.11+.
cd /tmp
rm -rf DU1010
mkdir DU1010
@nepsilon
nepsilon / postgres-import-export-csv.md
Last active July 29, 2024 01:26
Importing and Exporting CSV files with PostgreSQL — First published in fullweb.io issue #19

Importing and exporting CSV files with PostgreSQL

Let’s see how to use PostgreSQL to import and export CSV files painlessly with the COPY command.

Import CSV into table t_words:

COPY t_words FROM '/path/to/file.csv' DELIMITER ',' CSV;

You can tell quote char with QUOTE and change delimiter with DELIMITER.

@irlevesque
irlevesque / .bashrc
Created July 23, 2015 01:00
Git prompt
# If we're in a git repo, print the first 9 characters of the current committish.
function parse_git_commit() {
git rev-parse HEAD 2>/dev/null | cut -c1-10
}
# If we're in a git repo, print the current branch name. The sed call deletes
# any line not starting with '* ', then removes the '* '
function parse_git_branch () {
git rev-parse --abbrev-ref HEAD 2>/dev/null
}