Skip to content

Instantly share code, notes, and snippets.

View lithammer's full-sized avatar

Peter Lithammer lithammer

View GitHub Profile
@lithammer
lithammer / apple.css
Last active December 30, 2022 17:45
Apple Colors
/*
Apple Colors
https://developer.apple.com/design/human-interface-guidelines/ios/visual-design/color/#system-colors
*/
:root {
/* Light mode */
--color-light-gray-1: rgb(142, 142, 147);
--color-light-gray-2: rgb(174, 174, 178);
--color-light-gray-3: rgb(199, 199, 204);
--color-light-gray-4: rgb(209, 209, 214);
@lithammer
lithammer / Makefile
Last active February 7, 2017 21:46
Basic Makefile for C
TARGET = <binary name>
CFLAGS = -g -Wall -Wextra $(OPTFLAGS)
CC ?= llvm-gcc
BUILDDIR = build
DISTDIR = dist
HEADERS := $(wildcard src/**/*.h src/*.h)
SRC := $(wildcard src/**/*.c src/*.c)
#!/usr/bin/env bash
export PATH="$(dirname $0)/commands:$PATH"
export PS1='> '
bash --noprofile --norc
@lithammer
lithammer / .vimrc
Last active November 17, 2021 12:13
Small vimrc for servers
scriptencoding utf-8
if &compatible
set nocompatible
endif
" Tree style listing in netrw.
let g:netrw_liststyle = 3
" Hide patterns specified in .gitignore. Press "a" to cycle through the hiding modes.
set statusline=%1*\ [%n]\ [%f]%m%r%h%w%y[%{&ff}:%{strlen(&fenc)?&fenc:'none'}]%=%(\ %c,%l/%L\ %)%P
" │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
" │ │ │ │ │ │ │ │ │ │ │ │ │ │ └─ percent through file
" │ │ │ │ │ │ │ │ │ │ │ │ │ └─ total number of lines
" │ │ │ │ │ │ │ │ │ │ │ │ └─ current line number
" │ │ │ │ │ │ │ │ │ │ │ └─ current column number
" │ │ │ │ │ │ │ │ │ │ └─ left/right separator
" │ │ │ │ │ │ │ │ │ └─ file encoding
" │ │ │ │ │ │ │ │ └─ file format
" │ │ │ │ │ │ │ └─ file type
@lithammer
lithammer / userconfig.lua
Created July 7, 2012 10:26
Script to automatically position Aptechka raid frames bases on role (dps/tank or healer)
-- Aptechka raid frames:
-- https://github.com/rgd87/Aptechka
-- Usage:
-- Put this script into the AptechkaUserConfig\userconfig.lua file.
-- Moves the raid frames according to current spec
local Mover = CreateFrame('Frame')
Mover:RegisterEvent('PLAYER_ENTERING_WORLD')
Mover:RegisterEvent('GROUP_ROSTER_UPDATE')
@lithammer
lithammer / custom.lua
Created December 3, 2011 13:45
Custom script for oUF_NeavRaid that automatically positions and scales the raid frames based on spec and size of the raid
--[[
Slash command usage:
/raidscale 1.2
/raidscale reset
/rs 1.2
/rs reset
]]--
--[ CONFIG ]--
@lithammer
lithammer / gist:705058
Created November 18, 2010 14:43
Advanced Functional Programming, assignment 3 - Haskell
-- Peter Renström and Göran Nehlin
-- Advanced Functional Programming - Assignment 3 (Haskell)
-- 1.
-- Define an appropriate data type for binary search trees which uses strings
-- as keys.
--
-- Define a function insert k v t that inserts a key k with value v into the
-- tree t and returns the new tree.