Skip to content

Instantly share code, notes, and snippets.

View LarsJK's full-sized avatar

Lars-Jørgen Kristiansen LarsJK

View GitHub Profile
@LarsJK
LarsJK / knob_segmented_control.html
Last active May 11, 2022 12:42
knob segmented control
<div class="p-8">
<div class="flex items-center justify-center">
<div class="relative inline-flex rounded-full bg-gray-200 shadow-inner" role="toolbar">
<button type="button" class="m-[2px] inline-block rounded-full rounded-l-full px-6 py-2 text-xs font-medium uppercase leading-tight hover:text-gray-500 active:bg-white active:text-purple-700 active:shadow-sm">1</button>
<button type="button" class="m-[2px] inline-block rounded-full px-6 py-2 text-xs font-medium uppercase leading-tight text-gray-900 hover:text-gray-500 active:bg-white active:text-purple-700 active:shadow-sm">2</button>
<button type="button" class="m-[2px] inline-block rounded-full px-6 py-2 text-xs font-medium uppercase leading-tight text-gray-900 hover:text-gray-500 active:bg-white active:text-purple-700 active:shadow-sm">3</button>
<button type="button" class="m-[2px] inline-block rounded-full px-6 py-2 text-xs font-medium uppercase leading-tight text-gray-900 hover:text-gray-500 active:bg-white active:text-purp
@LarsJK
LarsJK / tw-segmented-control.html
Created May 5, 2022 12:13
Tailwind segmented control
<div class="m-10 inline-flex items-center -space-x-px rounded-md text-xs">
<div>
<input class="peer hidden" type="radio" name="grade" value="1" id="grade-1" />
<label class="cursor-pointer rounded-l-md border px-5 py-3 font-medium hover:bg-gray-50 peer-checked:bg-purple-500 peer-checked:text-white" for="grade-1"> 1 </label>
</div>
<div>
<input class="peer hidden" type="radio" name="grade" value="2" id="grade-2" />
@LarsJK
LarsJK / swift-linux-with-docker.md
Last active December 7, 2015 12:33
Run ubuntu with swift in a docker container, with local volumes mounted.

If you dont have Docker Toolkit installed intall it.

  1. Initialize docker /Applications/Docker/Docker\ Quickstart\ Terminal.app/Contents/Resources/Scripts/start.sh
  2. create a docker-compose.yml file in your source directory, with this contents:
ubuntu-swift:
  image: swiftdocker/swift
  volumes:
 - .:/code

Keybase proof

I hereby claim:

  • I am LarsJK on github.
  • I am larsjk (https://keybase.io/larsjk) on keybase.
  • I have a public key whose fingerprint is 683C 4DAE BC44 0E93 ECAF 0E99 642B 1CAA E873 E248

To claim this, I am signing this object:

@LarsJK
LarsJK / index.html
Last active August 29, 2015 14:05
Ember reroute based on relationship
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Ember Starter Kit</title>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/normalize/2.1.0/normalize.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="http://builds.handlebarsjs.com.s3.amazonaws.com/handlebars-v1.3.0.js"></script>
<script src="http://builds.emberjs.com/beta/ember.js"></script>
<script src="http://builds.emberjs.com/beta/ember-data.js"></script>