Skip to content

Instantly share code, notes, and snippets.

View juergenhoetzel's full-sized avatar
🎯
Focusing

Jürgen Hötzel juergenhoetzel

🎯
Focusing
View GitHub Profile
@juergenhoetzel
juergenhoetzel / lein-swank.el
Created May 30, 2010 22:20
Launch a Leiningen Swank Process and connect
We couldn’t find that file to show.
@juergenhoetzel
juergenhoetzel / window-rotate.el
Created December 1, 2011 11:01
Rotate windows to left
(require 'cl)
(defun rotate-left (l) (append (cdr l) (list (car l))))
(defun rotate-windows ()
(let ((start-positions (rotate-left (mapcar 'window-start (window-list))))
(buffers (rotate-left (mapcar 'window-buffer (window-list)))))
(mapcar* (lambda (window buffer pos)
(set-window-buffer window buffer)
(set-window-start window pos))
(window-list)
@sam016
sam016 / AllGattCharacteristics.java
Last active April 22, 2024 10:51
Bluetooth GATT Services & Characteristics
package com.sam016.vsflatomation.service.ble;
import java.util.HashMap;
import java.util.UUID;
public class AllGattCharacteristics {
private static HashMap<String, String> attributes = new HashMap();
static {
attributes.put("00002a00-0000-1000-8000-00805f9b34fb", "Device Name");
@juergenhoetzel
juergenhoetzel / utf16.go
Created December 8, 2018 09:43
Decode utf16 (little or big endian) to string
package main
import (
"bytes"
"encoding/binary"
"fmt"
"unicode/utf16"
)
func DecodeUtf16(b []byte, order binary.ByteOrder) (string, error) {
@ityonemo
ityonemo / test.md
Last active April 25, 2024 10:23
Zig in 30 minutes

A half-hour to learn Zig

This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/

Basics

the command zig run my_code.zig will compile and immediately run your Zig program. Each of these cells contains a zig program that you can try to run (some of them contain compile-time errors that you can comment out to play with)