Skip to content

Instantly share code, notes, and snippets.

View codyzu's full-sized avatar

Cody Zuschlag codyzu

View GitHub Profile
@codyzu
codyzu / .bashrc
Last active April 12, 2017 15:30
.bashrc for arch (antegros)
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# improve the path
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
@codyzu
codyzu / updatemirrors
Created February 10, 2017 10:10
update arch mirrors using reflector
sudo reflector --verbose -l 200 -p http --sort rate --save /etc/pacman.d/mirrorlist
@codyzu
codyzu / time-over-http-hack
Created February 10, 2017 10:12
update time from google.com (useful when network blocks NTM)
date -s "$(wget -S "http://www.google.com/" 2>&1 | grep -E '^[[:space:]]*[dD]ate:' | sed 's/^[[:space:]]*[dD]ate:[[:space:]]*//' | head -1l | awk '{print $1, $3, $2, $5 ,"GMT", $4 }' | sed 's/,//')"
@codyzu
codyzu / pl
Created February 10, 2017 10:13
pygmentize piped to less
#!/bin/bash
pygmentize $1 | less -R -N
@codyzu
codyzu / gcloud-publish-cron.sh
Last active February 7, 2018 16:18
gcloud-publish-cron
gcloud beta pubsub topics publish cron-5-minutes --message="run cron"
@codyzu
codyzu / every-5-minutes.cron.yaml
Created February 27, 2018 16:53
Kubernetes CronJob publishing to a PubSub topic
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: every-5-minutes
spec:
schedule: "*/5 * * * *"
jobTemplate:
spec:
template:
spec:
@codyzu
codyzu / deploy-cf.sh
Created March 16, 2018 15:51
gcloud-deploy-cf
gcloud beta functions deploy my-cloud-function --source=https://source.developers.google.com/projects/${PROJECT}/repos/${SOURCE_REPO}/fixed-aliases/${GIT_TAG}
@codyzu
codyzu / TFTP factory reset TP-Link TL-WR820N V1.md
Last active January 2, 2024 20:50
Procedure to restore the factory firmware on a TL-WR810N v1 rotuer (restoring from openWRT or dd-wrt)
@codyzu
codyzu / dell-xps-9560-ubuntu.md
Last active December 6, 2019 15:08
Dell XPS 9560 Ubuntu 18.04+ Changes

Installation

Sometimes the installer crashes. With 19.10, this happened when trying to connect to the wifi. The solution is to set the kernel parameters when starting the installer or live environment.

  1. Press e when the grub boot menu is displayed (the menu that lets you "Try Ubuntu" or "Install Ubuntu")
  2. On the line containing the kernel parameters, add the following (to the same line) after quiet splash:
    acpi_rev_override i915.modeset=1 nouveau.modeset=0
    

Note: I'm not sure if they are all needed, but it fixed the installer from crashing when connecting to the wifi.