Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View derekbassett's full-sized avatar

Derek Bassett derekbassett

View GitHub Profile
@johngrimes
johngrimes / macos-10133-fail.md
Last active February 5, 2021 19:39
macOS 10.13.3 Update FAIL

I had some massive problems when installing the 10.13.3 update on macOS. The update installed, my computer successfully restarted - but on a subsequent restart the boot failed and displayed the following installation log:

Apr  4 04:07:04 MacBook-Pro opendirectoryd[186]: [session] Processing a network change notification
Apr  4 04:07:06 MacBook-Pro Unknown[526]: Launching the Language Chooser for an OS Install
Apr  4 04:07:06 MacBook-Pro bspowerassertiontool[521]: Tool exited successfully (0).
Apr  4 04:07:06 MacBook-Pro launchprogresswindow[524]: ISAP: Show progress UI called
Apr  4 04:07:07 MacBook-Pro Installer Progress[180]: Progress UI App Starting
Apr  4 04:07:32 MacBook-Pro opendirectoryd[186]: [session] Received a network change notification
Apr  4 04:07:32 MacBook-Pro opendirectoryd[186]: [session] Received a network change notification
@so0k
so0k / kubectl.md
Last active March 22, 2024 13:03
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
@konradko
konradko / golang_on_rpi.md
Last active April 12, 2020 17:36
Install Golang 1.7 on Raspberry Pi
wget https://storage.googleapis.com/golang/go1.7.linux-armv6l.tar.gz
tar -C /usr/local -xzf go1.7.linux-armv6l.tar.gz
export PATH=$PATH:/usr/local/go/bin
@lizrice
lizrice / main.go
Created August 25, 2016 10:02
Container from scratch
package main
// @lizrice, mostly copied from @doctor_julz: https://gist.github.com/julz/c0017fa7a40de0543001
import (
"fmt"
"os"
"os/exec"
"syscall"
)
@subfuzion
subfuzion / Makefile.md
Last active October 18, 2023 14:49
Makefile for Go projects

Go has excellent build tools that mitigate the need for using make. For example, go install won't update the target unless it's older than the source files.

However, a Makefile can be convenient for wrapping Go commands with specific build targets that simplify usage on the command line. Since most of the targets are "phony", it's up to you to weigh the pros and cons of having a dependency on make versus using a shell script. For the simplicity of being able to specify targets that can be chained and can take advantage of make's chained targets,

@agouriou
agouriou / nginx.conf
Last active April 5, 2024 15:57 — forked from Stanback/nginx.conf
Example Nginx (> 1.9) configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs. Handle error status (4xx, 5xx) and expose headers.
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your location block(s):
#
# include cors_support;
#
# A limitation to this method is that Nginx doesn't currently send headers
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
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

@julz
julz / main.go
Created November 20, 2015 12:39
containersched minicontainer
package main
import (
"fmt"
"os"
"os/exec"
"syscall"
)
func main() {
//: Mocks Playground
import UIKit
struct User {
}
struct PushNotificationController {
let registrar: PushNotificationRegistrar
init(registrar: PushNotificationRegistrar) {
@jakeonrails
jakeonrails / .change-tab-color-pwd
Created September 24, 2015 01:23
How to have change the tab color in iTerm2 based on what folder or directory you are in
#!/usr/bin/env python
"""
Set terminal tab / decoration color by the server name.
Get a random colour which matches the server name and use it for the tab colour:
the benefit is that each server gets a distinct color which you do not need
to configure beforehand.
"""