Skip to content

Instantly share code, notes, and snippets.

View Gems's full-sized avatar
✏️
Typing…

Eduard Gomoliako Gems

✏️
Typing…
View GitHub Profile
@arkku
arkku / qmk_apple_fn.patch
Last active March 3, 2024 14:22
Patch for QMK firmware to add two keycodes for Apple Fn: KC_APFN simulates the key directly, whereas APFN_LAYER(x) works as MO(x) but also registers as holding down Apple Fn _when no other key is pressed_. APFN_KEY(x) is key x together with Apple Fn.
diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk
index c976b8296d..335b432e78 100644
--- a/builddefs/common_features.mk
+++ b/builddefs/common_features.mk
@@ -108,6 +108,12 @@ ifeq ($(strip $(MOUSEKEY_ENABLE)), yes)
SRC += $(QUANTUM_DIR)/mousekey.c
endif
+ifeq ($(strip $(APPLE_FN_ENABLE)), yes)
+ OPT_DEFS += -DAPPLE_FN_ENABLE -DENABLE_APPLE_FN_KEY=1
@adriancmiranda
adriancmiranda / usage.js
Last active September 19, 2024 21:49
Hook for canvas rendering in react | useCanvas.js | useWindowSize.js
import React from 'react';
import useCanvas from './useCanvas';
import useWindowSize from './useWindowSize';
const Canvas = (props) => {
const [canvasRef, tracer] = useCanvas('2d');
const [width, height] = useWindowSize();
const draw = tracer((gl) => {
gl.clearRect(0, 0, width, height);
@fauxpark
fauxpark / applefn.patch
Last active September 18, 2024 08:31
QMK Apple Fn
diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk
index 18f8b0bbfc..4ef3e230e4 100644
--- a/builddefs/common_features.mk
+++ b/builddefs/common_features.mk
@@ -878,6 +878,10 @@ ifeq ($(strip $(JOYSTICK_ENABLE)), yes)
endif
endif
+ifeq ($(strip $(APPLE_FN_ENABLE)), yes)
+ OPT_DEFS += -DAPPLE_FN_ENABLE

от Али-Бабы и разбойников, к лье под водой и к вархаммеру

Давайте я сразу скажу - речь пойдет о биткоинах. При этом не буду вас агитировать за или против - это вообще не мое дело. Я просто расскажу вам о своем отношении к этому феномену и мифам вокруг него.

Для начала стоит сказать, что я не рассматриваю биткоин как валюту. Это не средство, которое заменит кредитные карты или ежедневные расчеты - для этого есть lightning network и другие средства децентрализации. Для меня биткоин - это актив, максимально похожий на золото во всех его проявлениях, кроме физического присутствия. Биткоины добывают, причем, чем больше биткоинов люди уже добыли, тем сложнее добывать дальше. Количество биткоинов, которые вообще можно будет добыть и пустить в оборот, фиксировано. Обмен биткоинами происходит “из рук в руки”. Хранить биткоины не трудно, затратно только получить или передать их. Замените “биткоины” на “золото” - каждое из этих заявлений так же будет действительно.

Поведение “золотых с

@chrismytton
chrismytton / yaml2json.sh
Created October 19, 2016 15:32
Shell function to convert YAML to JSON
yaml2json () {
ruby -r yaml -r json -e 'puts YAML.load($stdin.read).to_json'
}
@ericelliott
ericelliott / essential-javascript-links.md
Last active September 9, 2024 15:49
Essential JavaScript Links
@trusktr
trusktr / DefaultKeyBinding.dict
Last active September 19, 2024 00:58
My DefaultKeyBinding.dict for Mac OS X
/* ~/Library/KeyBindings/DefaultKeyBinding.Dict
This file remaps the key bindings of a single user on Mac OS X 10.5 to more
closely match default behavior on Windows systems. This makes the Command key
behave like Windows Control key. To use Control instead of Command, either swap
Control and Command in Apple->System Preferences->Keyboard->Modifier Keys...
or replace @ with ^ in this file.
Here is a rough cheatsheet for syntax.
Key Modifiers
@chrislkeller
chrislkeller / import_json_appsscript.js
Last active September 5, 2024 15:22
Adds what amounts to an =ImportJSON() function to a Google spreadsheet... To use go to Tools --> Script Editor and add the script and save.
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
@danielfaust
danielfaust / samsung_remote.py
Created May 30, 2011 04:12
Samsung TV Remote Control Python Script
import time
import socket
import base64
src = '192.168.1.2' # ip of remote
mac = '00-AB-11-11-11-11' # mac of remote
remote = 'python remote' # remote name
dst = '192.168.1.3' # ip of tv
app = 'python' # iphone..iapp.samsung
@peterhost
peterhost / node_debian_init.sh
Created November 25, 2010 11:41
Daemon init script for node.js based app/server (DEBIAN/UBUNTU)
#!/bin/sh
# ------------------------------------------------------------------------------
# SOME INFOS : fairly standard (debian) init script.
# Note that node doesn't create a PID file (hence --make-pidfile)
# has to be run in the background (hence --background)
# and NOT as root (hence --chuid)
#
# MORE INFOS : INIT SCRIPT http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit
# INIT-INFO RULES http://wiki.debian.org/LSBInitScripts
# INSTALL/REMOVE http://www.debian-administration.org/articles/28