Skip to content

Instantly share code, notes, and snippets.

View chreke's full-sized avatar
💭
Just catching up on some reading

Christoffer Ekeroth chreke

💭
Just catching up on some reading
View GitHub Profile
[
{
"id": "9fbc18",
"title": "Chicken Parmesan",
"prep_time": 45,
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
"tags": [
"poultry",
"italian",
"main"
@chreke
chreke / .gitconfig
Last active September 23, 2020 14:49
Example .gitconfig
[alias]
st = status
ci = commit --verbose
br = branch
co = checkout
# List branches sorted by latest commit date
mru = branch --sort=-committerdate
[user]
name = John Doe
email = john.doe@example.com
@chreke
chreke / hemlagad-huel.md
Last active August 23, 2023 09:27
Recept på "hemlagad" "Huel"

Hemlagad Huel

  • 200 g kvarg
  • 1 banan
  • 1 dl havregryn
  • 3 dl mjölk (3%)
  • 1 msk olivolja
  • 0,5 tsk salt

Instruktioner:

@chreke
chreke / remind.py
Created October 9, 2017 13:30
Add Reminder item from command line
#!/usr/bin/python
import datetime
import re
import subprocess
title = raw_input('What do you want to be reminded about? ')
assert title, 'Title cannot be blank'
when = raw_input('When do you want to be reminded? ')
@chreke
chreke / filters.js
Last active February 22, 2017 11:49
let filters = [f1, f2, f3]
let users = [u1, u2, u3, u4, u5]
users.filter((user) => {
for f in filters {
if (!f(user)) {
return false
}
}
return true
@chreke
chreke / examples.swift
Last active January 18, 2017 09:15
Some Swift code examples
// A constant Int
let meaningOfLife = 42
// A variable String
var greeting = "Hello!"
// Type inference on enum members
var directionToHead = CompassPoint.west
directionToHead = .east
@chreke
chreke / examples.swift
Created January 13, 2017 16:24
Some Swift example code
var maybeString: String?
var maybeAnotherString: String?
maybeString = "hej"
// Optional binding
if let aString = maybeString {
print("This is a string: \(aString)")
}
@chreke
chreke / examples.swift
Created January 13, 2017 16:24
Some Swift example code
var maybeString: String?
var maybeAnotherString: String?
maybeString = "hej"
// Optional binding
if let aString = maybeString {
print("This is a string: \(aString)")
}
@chreke
chreke / git-commands.sh
Last active October 4, 2016 09:26
Git command cheat sheet
# GENERAL
# =======
# View status
git status
# ADDING CHANGES
# ==============
# The "staging area" is git terminology for what will end up in your next commit
@chreke
chreke / .gitconfig
Created October 4, 2016 07:26
Example Git configuration
; Aliases lets you define shortcuts for common git commands,
; so you can type "git st" instead of "git status", for example.
[alias]
st = status
ci = commit --verbose
br = branch
co = checkout
; IMPORTANT! Please specify the same email address here as the one
; you use on GitHub!
[user]