Skip to content

Instantly share code, notes, and snippets.

View boring-km's full-sized avatar
💥
Try harder

Kangmin boring-km

💥
Try harder
View GitHub Profile
@boring-km
boring-km / HideSystemUI.kt
Last active July 4, 2023 08:59
Android Hide Status Bar and Navigation Bar
import android.os.Build
import android.os.Handler
import android.os.Looper
import android.view.View
import android.view.Window
import android.view.WindowInsets
import android.view.WindowInsetsController
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
@boring-km
boring-km / record_auto_stop
Created September 15, 2022 15:03
How to stop record audio automatically in Flutter
import 'package:audioplayers/audioplayers.dart';
import 'package:flutter/material.dart';
import 'package:path_provider/path_provider.dart';
import 'package:record/record.dart';
void main() {
runApp(const MaterialApp(
home: AutoRecordStopPage(),
));
}
🌞 Morning 189 commits ███▏░░░░░░░░░░░░░░░░░ 15.4%
🌆 Daytime 225 commits ███▊░░░░░░░░░░░░░░░░░ 18.3%
🌃 Evening 650 commits ███████████░░░░░░░░░░ 52.9%
🌙 Night 164 commits ██▊░░░░░░░░░░░░░░░░░░ 13.4%
@boring-km
boring-km / upload_dust.py
Last active March 13, 2019 14:15
upload_dust
import serial
import requests
import json
import socket
import time
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.util.retry import Retry
def execute():
ser = serial.Serial('/dev/ttyUSB0', 9600, timeout=1.0)
@boring-km
boring-km / register.py
Last active March 18, 2019 04:03
register_test
import requests
import json
import socket
import time
# import upload_dust
file = open('register.txt', 'r')
line = file.readline()
number = int(line)
file.close()
@boring-km
boring-km / test.c
Last active March 18, 2019 04:02
raspberry_auto_connect.c
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sstream>
#include <iostream>
#include <fstream>
#include <sys/socket.h>
#include <bluetooth/bluetooth.h>
#include <bluetooth/sdp.h>
#include <bluetooth/sdp_lib.h>
@boring-km
boring-km / DevideConquer.py
Created November 10, 2018 05:36
simple devide and conquer distance algoritm example with matplotlib
# 분할정복 가장 가까운 점들 사이의 거리 구하는 Algorithm
import matplotlib.pyplot as plt
def distance(a, b, c, d):
result = pow((pow(c - a, 2) + pow(d - b, 2)), 0.5)
return result
def searching(alist):