Skip to content

Instantly share code, notes, and snippets.

View renakim's full-sized avatar
🐱

YI Kim renakim

🐱
View GitHub Profile
@renakim
renakim / WiFiCheck
Created June 30, 2022 01:28 — forked from mharizanov/WiFiCheck
Script to check and re-connect WiFi on Raspberry Pi
#!/bin/bash
##################################################################
# A Project of TNET Services, Inc
#
# Title: WiFi_Check
# Author: Kevin Reed (Dweeber)
# [email protected]
# Project: Raspberry Pi Stuff
#
# Copyright: Copyright (c) 2012 Kevin Reed <[email protected]>
@renakim
renakim / get_logger.py
Last active May 3, 2022 05:33
Python logging module with RotatingFileHandler
import os
import logging
import logging.handlers
def get_logger(logger_name, path, filename):
"""
- logger_name: unique name
- path: base path
- name: logger name
@renakim
renakim / mediumToMarkdown.js
Created February 10, 2022 00:28
medium-to-markdown file save
const mediumToMarkdown = require("medium-to-markdown");
const fs = require("fs");
const link = <medium post url>
// Enter url here
mediumToMarkdown.convertFromUrl(link).then(function(markdown) {
// console.log(markdown); //=> Markdown content of medium post
// medium.com/ 이후의 string 값을 파일명으로 사용
@renakim
renakim / w5500-overlay.dts
Last active April 22, 2024 11:18
WIZnet W5500 device tree overlay example for Raspberry Pi kernel
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2835";
fragment@0 {
target = <&spi0>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
@renakim
renakim / mysql-docker.sh
Created March 5, 2019 00:39 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE