Skip to content

Instantly share code, notes, and snippets.

View stevenctl's full-sized avatar

Steven Landow stevenctl

View GitHub Profile
@sebastiancarlos
sebastiancarlos / sway-print-tree.bash
Last active February 19, 2024 15:18
sway-print-tree.bash (Pretty print Sway/i3 tree, color output, 'jq' is the only dependency)
#! /usr/bin/env bash
# ansi colors
bold='\033[1m'
red='\033[0;31m'
green='\033[0;32m'
yellow='\033[1;33m'
blue='\033[0;34m'
reset='\033[0m'
@FreyaHolmer
FreyaHolmer / FlyCamera.cs
Last active May 31, 2024 14:38
A camera controller for easily flying around a scene in Unity smoothly. WASD for lateral movement, Space & Ctrl for vertical movement, Shift to move faster. Add this script to an existing camera, or an empty game object, hit play, and you're ready to go~
using UnityEngine;
[RequireComponent( typeof(Camera) )]
public class FlyCamera : MonoBehaviour {
public float acceleration = 50; // how fast you accelerate
public float accSprintMultiplier = 4; // how much faster you go when "sprinting"
public float lookSensitivity = 1; // mouse look sensitivity
public float dampingCoefficient = 5; // how quickly you break to a halt after you stop your input
public bool focusOnEnable = true; // whether or not to focus and lock cursor immediately on enable
package main
import "fmt"
// WithPrefix
type prefixOption struct{}
func WithPrefix() interface {
GetOption
@cpietsch
cpietsch / README.md
Last active December 30, 2023 04:16
d3.js map with markers

Easy example on how to put marker on a d3.js map.

You got 2 options:

  • using d3.geo.path() which does all the work for you
  • using svg circles and translating them via projection(d.geometry.coordinates)