Skip to content

Instantly share code, notes, and snippets.

View roamingthings's full-sized avatar

Alexander Sparkowsky roamingthings

View GitHub Profile
@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");
@yatsu
yatsu / rbenv-ruby187-macos.sh
Last active July 13, 2023 19:36
Install ruby-1.8.7 with rbenv on macOS Catalina (10.15)
#!/bin/sh
# 1) Install Xcode 11
# 2) Install command line tools: `xcode-select --install`
# 3) Install HomeBrew
# 4) brew tap cartr/qt4 && brew install cartr/qt4/openssl@1.0 subversion rbenv
# 5) Setup rbenv
# 6) Run this command
PKG_CONFIG_PATH="$(brew --prefix cartr/qt4/openssl@1.0)/lib/pkgconfig" \

⚠️ this is now stupidly out of date

Computers

  • 13" Macbook Pro 3.3 GHz i7 (late 2016)
  • Microsoft Surface Book (2016)

Peripherals

@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active April 30, 2024 07:07
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@joshlong
joshlong / TestApplication.java
Last active June 9, 2022 09:49
an example demonstrating Spring's new `InjectionPoint` support
package com.example;
import org.springframework.beans.factory.InjectionPoint;
import org.springframework.beans.factory.ObjectFactory;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
@destan
destan / ParseRSAKeys.java
Last active March 29, 2024 10:43
Parse RSA public and private key pair from string in Java
import java.io.IOException;
import java.net.URISyntaxException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.security.KeyFactory;
import java.security.NoSuchAlgorithmException;
import java.security.PrivateKey;
import java.security.interfaces.RSAPublicKey;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.PKCS8EncodedKeySpec;
@thjanssen
thjanssen / MyEntity.java
Created April 12, 2016 05:34
Persisting Java 8 DateTime API with Hibernate 5
@Entity
public class MyEntity {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "id", updatable = false, nullable = false)
private Long id;
@Column
private LocalDate date;
@vossim
vossim / LICENSE
Last active November 17, 2018 09:22
Dashing widget to display the total number of Jira issues for a JQL query
The MIT License (MIT)
Copyright (c) 2015 Simon Vos
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@matthiasplappert
matthiasplappert / uikonf2014-slides.md
Last active November 28, 2018 13:04
UIKonf 2014 Slides
import java.io.IOException;
import java.util.ArrayList;
import java.util.Map;
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.ClientRequestContext;
import javax.ws.rs.client.ClientRequestFilter;
import javax.ws.rs.client.Entity;
import javax.ws.rs.client.WebTarget;