Skip to content

Instantly share code, notes, and snippets.

Avatar

Brian Riddle brianjriddle

  • Stockholm, Sweden
View GitHub Profile
@brianjriddle
brianjriddle / spacemacs-user-config.el
Created Jul 11, 2022
spacemacs hunspell configuration
View spacemacs-user-config.el
(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 Dec 17, 2021
best stupid hack to rinse formatting between all types of clients
View textit.sh
#!/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 Aug 29, 2015
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.
View fotbollskanalen-2015.css
/**
* 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 Aug 29, 2015
shrugging around
View shrugging.txt
¯\_(ツ)_/¯
# more from here
# http://mashable.com/2014/05/23/fun-text-emoticons/
(╯°□°)╯︵ ┻━┻
ᕕ( ᐛ )ᕗ
(ಠ_ಠ)
View keybase.md

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 Jan 22, 2014
save a ssl certificate for a host
View retrieve-cert.sh
#!/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 Nov 28, 2013
precmd that adds a separator
View prompt.sh
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 Nov 20, 2013
YAML formatter in ruby
View yaml-pp
#!/usr/bin/env ruby
require 'yaml'
yaml_file = YAML::load(File.open(ARGV[0]))
puts YAML::dump(yaml_file)
View jenkins-farwell.txt
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 Sep 22, 2013
Ant tasks to check if working directory is clean.
View build.xml
<?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>