Skip to content

Instantly share code, notes, and snippets.

View serpro69's full-sized avatar
🍵
breaking things when they work, so I can fix them later

Særgeir serpro69

🍵
breaking things when they work, so I can fix them later
View GitHub Profile
@serpro69
serpro69 / README-Template.md
Created March 19, 2019 08:21 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@serpro69
serpro69 / git-pull-all
Created August 10, 2020 10:59 — forked from grimzy/git-pull-all
Git pull all remote branches
#!/usr/bin/env bash
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
git fetch --all
git pull --all
@serpro69
serpro69 / pre-push.sh
Created September 19, 2020 06:28 — forked from pixelhandler/pre-push.sh
Git pre-push hook to prevent force pushing master branch
#!/bin/sh
# Called by "git push" after it has checked the remote status,
# but before anything has been pushed.
#
# If this script exits with a non-zero status nothing will be pushed.
#
# Steps to install, from the root directory of your repo...
# 1. Copy the file into your repo at `.git/hooks/pre-push`
# 2. Set executable permissions, run `chmod +x .git/hooks/pre-push`
@serpro69
serpro69 / conky_orange_4k.lua
Created December 26, 2020 13:44 — forked from anonymous/conky_orange_4k.lua
conky orange 4k resolution config files
--==============================================================================
-- conky_orange.lua
--
-- author : SLK
-- version : v2011062101
-- license : Distributed under the terms of GNU GPL version 2 or later
--
-- modified: me
-- version : v20171027
-- notes : works on 4k screen. uses conky conf newer >v1.1
@serpro69
serpro69 / expression_problem.clj
Created December 28, 2020 12:16 — forked from elnygren/expression_problem.clj
Solving the Expression Problem with Clojure
; The Expression Problem and my sources:
; http://stackoverflow.com/questions/3596366/what-is-the-expression-problem
; http://blog.ontoillogical.com/blog/2014/10/18/solving-the-expression-problem-in-clojure/
; http://eli.thegreenplace.net/2016/the-expression-problem-and-its-solutions/
; http://www.ibm.com/developerworks/library/j-clojure-protocols/
; To begin demonstrating the problem, we first need some
; "legacy code" with datastructures and functionality:
@serpro69
serpro69 / expression_problem.hs
Created December 28, 2020 12:16 — forked from chrisdone/expression_problem.hs
Solving the Expression Problem with Haskell
{-# LANGUAGE NamedFieldPuns #-}
-- The Expression Problem and my sources:
-- http://stackoverflow.com/questions/3596366/what-is-the-expression-problem
-- http://blog.ontoillogical.com/blog/2014/10/18/solving-the-expression-problem-in-clojure/
-- http://eli.thegreenplace.net/2016/the-expression-problem-and-its-solutions/
-- http://www.ibm.com/developerworks/library/j-clojure-protocols/
-- To begin demonstrating the problem, we first need some
@serpro69
serpro69 / ExpressionProblemWithImplicits.scala
Created December 28, 2020 12:16 — forked from izmailoff/ExpressionProblemWithImplicits.scala
Solving the Expression Problem with Scala's Implicits
object Main extends App {
import math._
// The Expression Problem and my sources:
// http://stackoverflow.com/questions/3596366/what-is-the-expression-problem
// http://blog.ontoillogical.com/blog/2014/10/18/solving-the-expression-problem-in-clojure/
// http://eli.thegreenplace.net/2016/the-expression-problem-and-its-solutions/
// http://www.ibm.com/developerworks/library/j-clojure-protocols/
@serpro69
serpro69 / functions.sh
Created July 26, 2021 06:17 — forked from junegunn/functions.sh
Key bindings for git with fzf (https://junegunn.kr/2016/07/fzf-git/)
# GIT heart FZF
# -------------
is_in_git_repo() {
git rev-parse HEAD > /dev/null 2>&1
}
fzf-down() {
fzf --height 50% --min-height 20 --border --bind ctrl-/:toggle-preview "$@"
}
@serpro69
serpro69 / .ideavimrc
Created October 2, 2021 10:54 — forked from AlexPl292/.ideavimrc
My `~/.ideavimrc` file
let mapleader=" "
""" Plugins --------------------------------
set surround
set multiple-cursors
set commentary
set argtextobj
set easymotion
set textobj-entire
set ReplaceWithRegister