Skip to content

Instantly share code, notes, and snippets.

View brianjriddle's full-sized avatar

Brian Riddle brianjriddle

View GitHub Profile
@brianjriddle
brianjriddle / spacemacs-user-config.el
Created July 11, 2022 11:02
spacemacs hunspell configuration
(defun dotspacemacs/user-config ()
"Configuration for user code:
This function is called at the very end of Spacemacs startup, after layer
configuration.
Put your configuration code here, except for variables that should be set
before packages are loaded."
;; For dictionaries look here https://wiki.openoffice.org/wiki/Dictionaries
(with-eval-after-load "ispell"
(setq ispell-program-name "hunspell")
;; ispell-set-spellchecker-params has to be called
@brianjriddle
brianjriddle / textit.sh
Created December 17, 2021 14:28
best stupid hack to rinse formatting between all types of clients
#!/bin/bash
# This has got to be the best dumb hack i've seen.
# what does this do? basically just strips *any* formatting you happen to have in your pastebuffer and remove it.
# Now i can copy and paste from any program and paste *clean* UTF-8 like ken thompson intended https://www.cl.cam.ac.uk/~mgk25/ucs/utf-8-history.txt
pbpaste | pbcopy
@brianjriddle
brianjriddle / fotbollskanalen-2015.css
Last active August 29, 2015 14:22
Som en besökare vill jag *läsa* allt text på fotbollskanalen.se så jag inte besöker någon annan sida att läsa om Blatters nergång.
/**
* Ser ut som det går inte att ladda Lato-Black fonten i chrome eller firefox.
* curl -I http://www.fotbollskanalen.se/fonts/Lato-Black.eot
* curl -I http://www.fotbollskanalen.se/fonts/Lato-Black.ttf
* returnera 404
* La till stylebot för att för detta att fungera på *.fotbollskanalen.se i Google Chrome browser
*/
h1, h2,h3, div.group-item__team , .group-item__info-time, .group-item__info-match, .group-item__info-competition, div, span, input {
font-family: helvetica;
@brianjriddle
brianjriddle / shrugging.txt
Last active August 29, 2015 14:20
shrugging around
¯\_(ツ)_/¯
# more from here
# http://mashable.com/2014/05/23/fun-text-emoticons/
(╯°□°)╯︵ ┻━┻
ᕕ( ᐛ )ᕗ
(ಠ_ಠ)

Keybase proof

I hereby claim:

  • I am brianjriddle on github.
  • I am brianjriddle (https://keybase.io/brianjriddle) on keybase.
  • I have a public key whose fingerprint is 7D75 F3E6 CF6B 6885 4BFB 3F82 972B BFC1 F278 3474

To claim this, I am signing this object:

@brianjriddle
brianjriddle / retrieve-cert.sh
Created January 22, 2014 14:51
save a ssl certificate for a host
#!/bin/sh
#
# usage: retrieve-cert.sh remote.host.name [port]
#
REMHOST=$1
REMPORT=${2:-443}
echo |\
openssl s_client -connect ${REMHOST}:${REMPORT} 2>&1 |\
sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p'
@brianjriddle
brianjriddle / prompt.sh
Created November 28, 2013 22:02
precmd that adds a separator
function brris_precmd_hook {
local bar=""
local separator="✨"
for ((i = 0; i < ${COLUMNS}; i++)) ; do
bar="${bar}${separator}"
done
echo $fg_bold[yellow]${bar}
}
[[ -z $precmd_functions ]] && precmd_functions=()
precmd_functions=($precmd_functions brris_precmd_hook)
@brianjriddle
brianjriddle / yaml-pp
Created November 20, 2013 08:28
YAML formatter in ruby
#!/usr/bin/env ruby
require 'yaml'
yaml_file = YAML::load(File.open(ARGV[0]))
puts YAML::dump(yaml_file)
@brianjriddle
brianjriddle / jenkins-farwell.txt
Created November 6, 2013 07:40
farewell jenkins
Hej Jenkins,
Vi behöver prata.
Vi har varit ihop några år nu men som Oall good things¹ även vi måste ta
slut.
Du har fått ögonen upp för andra och jag känner att det är dags för mig
att släppt dig fri.
@brianjriddle
brianjriddle / build.xml
Created September 22, 2013 08:00
Ant tasks to check if working directory is clean.
<?xml version="1.0" encoding="UTF-8"?>
<project name="git" default="is-working-directory-clean">
<target name="-git-status">
<exec executable="git" outputproperty="git.status.message" failifexecutionfails="false" errorproperty="">
<arg value="status"/>
<arg value="--short"/>
</exec>
<condition property="git.clean.wd">
<and>