Skip to content

Instantly share code, notes, and snippets.

View stigkj's full-sized avatar

Stig Kleppe-Jørgensen stigkj

View GitHub Profile
@mansu
mansu / kafka-server.properties
Created February 4, 2022 23:21
Slack Kafka server config
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@henrik242
henrik242 / Global macOS hotkeys for Google Meet, Spotify and others using AppleScript and Fastscripts.md
Last active October 22, 2024 15:18
Global macOS hotkeys for Google Meet, Spotify and others using AppleScript and Fastscripts
@misterjohannesson
misterjohannesson / pages_example_[id].ts
Created July 16, 2020 07:56
NextJS API Pages server-side wrapper
import post from "pages/api/post";
import serverApiHandler from "utils/serverApiHandler";
const IdExample = () => <div></div>
IdExample.getInitialProps = async ctx => {
const { query } = ctx;
let id = query.id;
let data = null;
@threepointone
threepointone / for-snook.md
Last active August 26, 2023 15:43
For Snook

https://twitter.com/snookca/status/1073299331262889984?s=21

‪“‬In what way is JS any more maintainable than CSS? How does writing CSS in JS make it any more maintainable?”

‪Happy to chat about this. There’s an obvious disclaimer that there’s a cost to css-in-js solutions, but that cost is paid specifically for the benefits it brings; as such it’s useful for some usecases, and not meant as a replacement for all workflows. ‬

‪(These conversations always get heated on twitter, so please believe that I’m here to converse, not to convince. In return, I promise to listen to you too and change my opinions; I’ve had mad respect for you for years and would consider your feedback a gift. Also, some of the stuff I’m writing might seem obvious to you; I’m not trying to tell you if all people of some of the details, but it might be useful to someone else who bumps into this who doesn’t have context)‬

So the big deal about css-in-js (cij) is selectors.

@mfeineis
mfeineis / FromReduxToElm.elm
Created March 11, 2018 01:48
A self-contained attempt at explaining The Elm Architecture (TEA) in terms of Redux - https://ellie-app.com/kKcXHF8fJa1/0
port module FromReduxToElm exposing (main)
import Html exposing (Html)
port sayHello : (String -> msg) -> Sub msg
type alias Model =
{ who : String
@csswizardry
csswizardry / README.md
Last active June 16, 2024 13:44
Vim without NERD tree or CtrlP

Vim without NERD tree or CtrlP

I used to use NERD tree for quite a while, then switched to CtrlP for something a little more lightweight. My setup now includes zero file browser or tree view, and instead uses native Vim fuzzy search and auto-directory switching.

Fuzzy Search

There is a super sweet feature in Vim whereby you can fuzzy find your files using **/*, e.g.:

:vs **/*<partial file name><Tab>
@philips
philips / users.md
Last active April 5, 2023 14:17
Kubernetes Third-Party Resource Users
@hdragomir
hdragomir / sm-annotated.html
Last active October 9, 2024 00:35
The deferred font loading logic for Smashing Magazine. http://www.smashingmagazine.com/
<script type="text/javascript">
(function () {
"use strict";
// once cached, the css file is stored on the client forever unless
// the URL below is changed. Any change will invalidate the cache
var css_href = './index_files/web-fonts.css';
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
el.addEventListener(ev, callback, false);
@robertmarsal
robertmarsal / README.md
Last active March 20, 2022 02:26 — forked from mtowers/README.md
Google Analytics Real Time Visitors Widget for Dashing with OAuth2 Authentication
@ilovezfs
ilovezfs / org.openzfsonosx.ilovezfs.zfs.zpool-import.plist
Last active July 5, 2016 17:56
org.openzfsonosx.ilovezfs.zfs.zpool-import.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.openzfsonosx.ilovezfs.zfs.zpool-import</string>
<key>ProgramArguments</key>
<array>
<string>/usr/sbin/zpool</string>
<string>import</string>