Skip to content

Instantly share code, notes, and snippets.

View ypetya's full-sized avatar
💭
🚀

Peter Kiss ypetya

💭
🚀
  • Budapest, Hungary
View GitHub Profile
@shinyquagsire23
shinyquagsire23 / gist:f7907fdf6b470200702e75a30135caf3
Created January 8, 2020 05:48
Philips Hue BLE Services and Characteristics (WIP)
DeviceInfo(softwareRevision, isOn,
SceneLightState(color, powerOnBehavior, deviceInfo
Light(id,
Capabilities(dimmable, customState
PowerOnBehavior(option
hueplay, huebloom, hueiris, huelightstrip, huego, plug, bollard, wallspot, groundspot, flexiblelamp, wallshade, walllantern
[ea:44:13:bd:db:59] Service [b8843add-0000-4aa1-8794-c3f462030bda] Unknown, ble_firmware_update?
[ea:44:13:bd:db:59] Characteristic [b8843add-0004-4aa1-8794-c3f462030bda]
@nikhita
nikhita / update-golang.md
Last active July 19, 2024 17:55
How to update the Go version

How to update the Go version

System: Debian/Ubuntu/Fedora. Might work for others as well.

1. Uninstall the exisiting version

As mentioned here, to update a go version you will first need to uninstall the original version.

To uninstall, delete the /usr/local/go directory by:

@izy521
izy521 / objectdeepcopy.js
Created July 30, 2016 17:28
`JSON.parse( JSON.stringify( obj) )` has been regarded as the fastest method for deep copying Objects, but is it? This is mainly just to test. Obviously Functions aren't allowed in JSON.
var Types = new Map();
Types.set(Array, function(v) {
var l = v.length; i = 0, a = Array(l);
for (i; i<l; i++) {
a[i] = v[i];
}
return a;
});
Types.set(Number, function(v) {
return v * 1;
@szaboat
szaboat / hatgyakorlatok.md
Last active August 29, 2015 14:12
Hat erosito gyakorlatok

Hat erosito gyakorlatok

Egy interval timer segitsegevel 30mp gyakorlat, 15mp pihenes. Mindegyikbol 3 ismetles. Ha ez mar jol megy akkor lehet 50mp gyakorlat, 10 mp pihenes.

Cat back

http://imbbpullzone.laedukreationpvt.netdna-cdn.com/wp-content/uploads/2010/12/Yoga-aasan-4.png

Atellenes kez lab emeles

@jashkenas
jashkenas / semantic-pedantic.md
Last active July 13, 2024 04:25
Why Semantic Versioning Isn't

Spurred by recent events (https://news.ycombinator.com/item?id=8244700), this is a quick set of jotted-down thoughts about the state of "Semantic" Versioning, and why we should be fighting the good fight against it.

For a long time in the history of software, version numbers indicated the relative progress and change in a given piece of software. A major release (1.x.x) was major, a minor release (x.1.x) was minor, and a patch release was just a small patch. You could evaluate a given piece of software by name + version, and get a feeling for how far away version 2.0.1 was from version 2.8.0.

But Semantic Versioning (henceforth, SemVer), as specified at http://semver.org/, changes this to prioritize a mechanistic understanding of a codebase over a human one. Any "breaking" change to the software must be accompanied with a new major version number. It's alright for robots, but bad for us.

SemVer tries to compress a huge amount of information — the nature of the change, the percentage of users that wil

app.directive('faFastScroll', ['$parse', function ($parse) {
var Interval = function(min, max) {
this.min = min || 0;
this.max = max || 0;
};
Interval.prototype.clip = function(min, max) {
if(this.max <= min || this.min >= max) {
this.min = this.max = 0;
@lalyos
lalyos / jmp
Last active August 29, 2015 13:58
#!/bin/bash
JUMPER_LIST=$(curl -Ls https://gist.githubusercontent.com/lalyos/10364962/raw/jumper.list)
list() {
cat <<EOF
known jumpers:
$JUMPER_LIST
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@szaboat
szaboat / olni_kell_ekkerjoz.md
Last active September 23, 2015 12:03
Ölni kell

Ölni kell

De nem muszáj gyilkolni.

„de nem muszáj gyilkolni.

Szárnyasokat könnyű, galambnak, gyöngyösnek nyakát kicsavarni semmi. Csirkét se nehéz, összekötöd a lábát, óvatosan rálépsz, szárnyát összefogod, arra is rálépsz, nyakán kicsit megtéped a tollat, és éles késsel elvágod a torkát. Kacsát, libát is nagyjából így, de ott kell kis izom, pulykánál pláne.

Nyulat megfogod a hátsó lábánál, fejbevágod a kés nyelével, elkábul, lehet sinkelni elfele. Birka se gond, csak össze kell kötni a lábát, és torkon szúrni valahol a nyakcsigolya és a gége között. Kecskét nehéz ölni, megérzi a bajt, néz, sír, de ha ez nem hat meg, akkor úgy múlik el, mint a birka.