Skip to content

Instantly share code, notes, and snippets.

View diffficult's full-sized avatar
💽
the big switcharoo

reese diffficult

💽
the big switcharoo
View GitHub Profile
@diffficult
diffficult / pixel-arch.md
Last active November 14, 2016 01:55 — forked from thirteen37/pixel-arch.md
Installing Arch on the Chromebook Pixel 2015

This describes a basic Arch Linux installation on a Chromebook Pixel 2015.

Note: I'm a coward, so I installed Arch to an SD card instead of wiping out the existing SSD.

Requirements

  • SD card. A very minimal Arch installation with XFCE will need about 2GB, so I think 4GB is the minimum you can get by with.
  • Arch installer on a USB drive. The 2013.05.01 is broken with the recent netctl change. So either get an older or newer one.
  • Some Arch Linux familiarity.
  • Time, patience, and good eyesight.
@diffficult
diffficult / moonphase.sh
Created April 16, 2017 07:43
Moonphase blocklet for i3
#!/bin/bash
moonphase(){
local lp=2551443
local now=$(date -u +"%s")
local newmoon=592500
local phase=$((($now - $newmoon) % $lp))
local phase_number=$((((phase / 86400) + 1)*100000))
# Multiply by 100000 so we can do integer comparison. Go Bash!
@diffficult
diffficult / .zpreztorc
Last active June 6, 2017 15:47
zsh prezto config file
#
# Sets Prezto options.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
#
# General
#
@diffficult
diffficult / .tmux.conf
Created October 26, 2017 23:29
2017-10 working tmux config
#Prefix Key
set -g prefix ^a
set -g status-keys vi
setw -g mode-keys vi
# setw -g mode-mouse on
unbind c
unbind i
unbind l
unbind s
@diffficult
diffficult / gist:ac00c706dda17f114a1f243af4667700
Created April 4, 2018 23:21 — forked from fabiofl/gist:5873100
Clear Mac OS X's icon cache.
sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \;
@diffficult
diffficult / statusgit
Created May 16, 2018 02:19 — forked from armeenm/statusgit
Update all git repositories recursively.
#!/bin/bash
declare -a COLORS
j=0
# Default colors are light for dark terminals.
# Use '-l' option for normal (darker) text.
# Red, green, yellow, blue, magenta, cyan.
for i in {91..96}; do COLORS[$j]=$i; let "j++"; done
usage() {
@diffficult
diffficult / try_to_fix_[drm_kms_helper]_in_english.md
Created October 30, 2018 15:55 — forked from i0z0m/[drm_kms_helper]-flip_done-timed-out.md
[drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [CRTC:37:pipe A] flip_done timed out.

a symptom

I am the Japanese and not good at writng English. I'm sorry to my language ability for you.
I sometimes get the following error when logging out of Xorg. It's a little different to [xf86-video-intel] flip_done timed out, but it's similar.
[drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] ERROR [CRTC:37:pipe A] flip_done timed out.

Using the video=SVIDEO-1:d kernel parameter doesn't work for me.
I'm running Arch Linux (4.17.2-1) on my laptop ThinkPad X220 with xf86-video-intel (my CPU is an i5-2540M).

$ dmesg
$ hwinfo

@diffficult
diffficult / docker-cleanup-resources.md
Created February 18, 2019 15:34 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@diffficult
diffficult / move_install_to_encrypted_disk.md
Created April 21, 2019 00:47
Move Arch install to Encrypted Disk

Hi, guys.

Thanks to this guide and Arch Wiki I was able to move my existing Arch installation to an encrypted SDD.

Step 1: Preparing new disk drive (UEFI/GPT)

parted /dev/sdX

To create a new EFI System Partition, use the following commands (a size of 512MiB is suggested):

@diffficult
diffficult / pihole_grafana.md
Created May 11, 2019 16:15
Pi-hole Dashboard on Grafana