Skip to content

Instantly share code, notes, and snippets.

View e0en's full-sized avatar

Yoonseop Kang e0en

  • None
  • Seoul, South Korea
  • 08:16 (UTC +09:00)
  • X @e0en
View GitHub Profile
#!/bin/bash
# Get the number of rows available in the terminal
ROWS=$(tput lines)
# Generate your nmcli content
CONTENT=$(nmcli -f SSID,RATE,CHAN,SIGNAL,BARS dev wifi list | awk '!seen[$1]++')
# Check if the content exceeds the available rows
if [ $(echo "$CONTENT" | wc -l) -gt $ROWS ]; then
@k5njm
k5njm / gist:b50a25279a2b2623264d7a2690c95c13
Created August 26, 2023 22:00
Beepy tmux WiFi status
nick@beepy:~ $ cat .tmux.conf
#set -g monitor-silence 5
#set-hook alert-silence 'run-shell "echo hello"'
set-option -g status-interval 15
set-option -g status-right "#(~/bin/wifi_status.sh) "
set-option -ag status-right "#(~/repos/beepy-battery/src/battery.sh ) "
set-option -ag status-right "#(vcgencmd measure_temp | cut -c6-9 )C"
@ardangelo
ardangelo / beepy-hub.md
Last active January 20, 2024 04:19
Beepy Hub
  • Improved power management
  • Updatable firmware (2023-12-09)
    • Use pico-flashloader preload stage (2023-09-04)
    • Flash test image hardcoded into firmware (2023-12-03)
    • Implement I2C firmware update protocol (2023-12-08)
  • Shutdown / rewake command (2023-11-30)
  • Real time clock support
  • Sticky modifier keys
@longfin
longfin / writing.md
Last active October 31, 2024 05:50
엔지니어를 위한 글쓰기

이 글은 Heinrich Hartmann 님이 작성하신 글을 한국어로 번역한 것입니다. 원문은 https://www.heinrichhartmann.com/posts/writing/ 에서 확인하실 수 있습니다.


글쓰기는 큰 조직에서 영향력을 발휘하는 데 중요합니다. 경력 있는 소프트웨어 엔지니어로서의 글쓰기는 직무 범위를 확장하고 경력을 발전시키기 위해 획득해야 하는 가장 중요한 기술입니다.

글쓰기는 어렵습니다. 많은 소프트웨어 엔지니어들이 글쓰기와 씨름하죠. 저도 개인적으로 문학에 대한 관심이 없기 때문에 글쓰기가 자연스럽지 않았습니다.

@huytd
huytd / wordle.md
Last active April 1, 2025 00:28
Wordle in less than 50 lines of Bash

image

How to use:

./wordle.sh

Or try the unlimit mode:

@beesandbombs
beesandbombs / sineShine.pde
Created January 21, 2020 01:14
sine shine
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
if (p < 0.5)
return 0.5 * pow(2*p, g);
int bluePin = 2; //IN1 on the ULN2003 Board, BLUE end of the Blue/Yellow motor coil
int pinkPin = 3; //IN2 on the ULN2003 Board, PINK end of the Pink/Orange motor coil
int yellowPin = 4; //IN3 on the ULN2003 Board, YELLOW end of the Blue/Yellow motor coil
int orangePin = 5; //IN4 on the ULN2003 Board, ORANGE end of the Pink/Orange motor coil
//going up
//Keeps track of the current step.
//We'll use a zero based index.
int currentStep = 0;
void setup() {
@andrewstucki
andrewstucki / gist:b3242e6a5a4520cabfa1a15ff857ca3f
Created November 11, 2017 03:31
Compile Proxygen on Mac OS X
# homebrew dependencies
brew install folly autoconf-archive wget boost
# wangle
curl -L https://github.com/facebook/wangle/archive/v2017.11.06.00.tar.gz | tar xvzf -
mkdir wangle-2017.11.06.00/wangle/Release && cd wangle-2017.11.06.00/wangle/Release
cmake -DCMAKE_BUILD_TYPE=Release -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl ..
make -j 8
make install
@nrollr
nrollr / nginx.conf
Last active April 19, 2025 18:42
NGINX config for SSL with Let's Encrypt certs
# UPDATED 17 February 2019
# Redirect all HTTP traffic to HTTPS
server {
listen 80;
listen [::]:80;
server_name www.domain.com domain.com;
return 301 https://$host$request_uri;
}
# SSL configuration
@kipyegonmark
kipyegonmark / squid.conf
Created March 12, 2016 16:18
Sample configuration for squid proxy server. Source here -> https://calomel.org/squid.html
#
### Calomel.org Squid squid.conf
#
########### squid.conf ###########
#
## interface, port and proxy type
#http_port 10.10.10.1:8080 transparent
http_port 10.10.10.1:8080
## general options