Skip to content

Instantly share code, notes, and snippets.

View t3hk0d3's full-sized avatar
🏠
Working from home

Igor Yamolov t3hk0d3

🏠
Working from home
  • Booking.com
  • Amsterdam, Netherlands
View GitHub Profile

Как выйти из Российского Гражданства

https://netherlands.mid.ru/ru/consular-services/consulate-ru/citizenship/vykhod_iz_grazhdanstva_rf/

Необходимые документы

  • Заявление в двух экземплярах. Образец
  • Загран. паспорт РФ + копия
  • Загран. паспорт Нидерландов + копия + заверенный перевод. Пример перевода
  • Внутренний паспорт РФ + копия
@t3hk0d3
t3hk0d3 / mqtt_sensors.yaml
Last active September 15, 2023 18:42
Teslamate Home Assistant MQTT config
- sensor:
name: Display Name
unique_id: teslamate_1_display_name
availability: &teslamate_availability
- topic: teslamate/cars/1/healthy
payload_available: 'true'
payload_not_available: 'false'
device: &teslamate_device_info
identifiers: [teslamate_car_1]
configuration_url: https://teslamate.home/
@t3hk0d3
t3hk0d3 / linux-fix-fake-bt-dongle.patch
Created February 7, 2021 00:12
Patch to fix broken fake-CSR BT dongle
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 80468745d..953eba56d 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -1768,6 +1768,7 @@ static int btusb_setup_csr(struct hci_dev *hdev)
struct hci_rp_read_local_version *rp;
struct sk_buff *skb;
bool is_fake = false;
BT_DBG("%s", hdev->name);
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.unbrokendome.jackson.beanvalidation.BeanValidationModule;
import org.unbrokendome.jackson.beanvalidation.JsonValidated;
import javax.validation.ConstraintViolationException;
@t3hk0d3
t3hk0d3 / .zshrc
Created January 15, 2019 10:42
How to speed-up Powerline9k VCS on huge repositories
# Add following lines to the end of ~/.zshrc
# Disables git-untracked
POWERLEVEL9K_VCS_GIT_HOOKS=(vcs-detect-changes git-aheadbehind git-stash git-remotebranch git-tagname)
# Disables tracking of changed files
zstyle ':vcs_info:git:*' check-for-changes false
zstyle ':vcs_info:git:*' get-revision false
package Test {
use Keyword::Declare;
my $vars = {};
keyword let (Str $name, Block $block) {
$name =~ s/^("|')(.*)("|')$/$2/;
"my sub $name { \$vars->{$name} //= do $block }"
}
#include <stdio.h>
#include <stdlib.h>
#include <libfswatch/c/libfswatch.h>
#include <pthread.h>
#include <unistd.h>
/**
* $ ${CC} -I /usr/local/include -o "fswatch_test" fswatch_test.c /usr/local/lib/libfswatch.dylib
*/
Warming up --------------------------------------
functional_xor 16.702k i/100ms
iterator_xor 17.805k i/100ms
pack_xor 18.711k i/100ms
.each_byte 3.232k i/100ms
.bytes 16.976k i/100ms
.getbyte 23.730k i/100ms
.byteslice 17.928k i/100ms
.getbyte 8 28.353k i/100ms
.byteslice 8 19.803k i/100ms
def test(&block)
GC.disable
before_strings = ObjectSpace.each_object(String).to_a
yield
after_strings = ObjectSpace.each_object(String).to_a
p after_strings - before_strings
<?php
/**
* Active record pattern implementation
*
* @author Igor Yamolov <clouster@yandex.ru>
*/
class ActiveRecord {
protected static $_defaultDBConnection;