Skip to content

Instantly share code, notes, and snippets.

View alexpearce's full-sized avatar

Alex Pearwin alexpearce

View GitHub Profile
@raphlinus
raphlinus / not_too_clever.md
Created June 23, 2022 00:50
Translation of grugbrain.dev into English

The not-too-clever programmer

This is a translation of grugbrain.dev into clear English. All props to the original author.

Introduction

This is a collection of thoughts on software development, originally written by an pseudonymous author styling themselves the "grug brain developer," but then translated into clear English by Raph Levien.

I am not an extremely smart developer, but I have many years of experience and have learned some things, although still don't know everything.

@steakunderscore
steakunderscore / statefulset-chmod.yaml
Last active May 23, 2023 16:45
Example of using an init container chown the data in a pvc as a pod starts.
# Example of using an init container chown the data in a pvc as a pod starts. Useful for migrating
# which user and group your containers run as.
# Works by having an init container mount your data, chmod it before it's consumed by your main container.
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: mysql-statefull
spec:
@dominikmuller
dominikmuller / ycm_extra_conf.py
Created April 20, 2018 08:47
YCM extra config for LHCb projects. Finds compilation flags for header files.
import os
import ycm_core
from clang_helpers import PrepareClangFlags
import fnmatch
def DirectoryOfThisScript():
return os.path.dirname(os.path.abspath(__file__))
@srih4ri
srih4ri / gho.md
Last active May 19, 2016 15:14
Github Open (gho)

gho

Gho is a fish shell function :

function gho
  open https://(git config --get remote.origin.url|sed -e s/.git//g|sed s,:,/,g)/$argv
end

With gho, you can :

@1v
1v / gist:7473b4acbaac0d79877d
Last active May 31, 2018 16:45
Nginx behind Apache

Nginx behind Apache

Install mod_proxy_http:

a2enmod proxy_http

Add to /etc/apache2/apache2.conf (change ip):

<VirtualHost 11.1.11.111:80 >
	ServerName site.com
@hSATAC
hSATAC / 256color.pl
Created July 20, 2011 14:48
256color.pl
#!/usr/bin/perl
# Author: Todd Larason <jtl@molehill.org>
# $XFree86: xc/programs/xterm/vttests/256colors2.pl,v 1.2 2002/03/26 01:46:43 dickey Exp $
# use the resources for colors 0-15 - usually more-or-less a
# reproduction of the standard ANSI colors, but possibly more
# pleasing shades
# colors 16-231 are a 6x6x6 color cube
for ($red = 0; $red < 6; $red++) {