Skip to content

Instantly share code, notes, and snippets.

View e0en's full-sized avatar

Yoonseop Kang e0en

  • None
  • Seoul, South Korea
  • 12:15 (UTC +09:00)
  • X @e0en
View GitHub Profile
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 29, 2025 22:13
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@sbright33
sbright33 / stepper2.ino
Created November 30, 2012 20:38
Stepper library for 28BYJ-48
// This Arduino example demonstrates bidirectional operation of a
// 28BYJ-48, which is readily available on eBay for $4.25 inc shipping,
// using a ULN2003 interface board to drive the stepper. The 28BYJ-48
// motor is a 4-phase, 8-beat motor, geared down by a factor of 64. One
// bipolar winding is on motor pins 1,3 and the other on motor pins 2,4.
// Refer to the manufacturer's documentation of Changzhou Fulling
// Motor Co., Ltd., among others. The step angle is 5.625/64 and the
// operating Frequency is 100pps. Current draw is 92mA.
// Vin w USB power is 4.5v too slow for testing use 5v pin.
//#include <Narcoleptic.h>
@sbright33
sbright33 / stepper2small.pde
Created November 30, 2012 21:09
Servo and stepper easing example
// This Arduino example demonstrates bidirectional operation of a
// 28BYJ-48, which is readily available on eBay for $4.25 inc shipping,
// using a ULN2003 interface board to drive the stepper.
#include <Servo.h>
#define dw digitalWrite
#define dm delayMicroseconds
#define wr32 Serial.write(32);
#define wr13 Serial.write(10);
const int mp1 = 4; // Blue - 28BYJ48 pin 1
const int mp2 = 5; // Pink - 28BYJ48 pin 2
@hpcorona
hpcorona / squid.conf
Created March 1, 2013 16:06
simple squid3 configuration to allow all to connect to all
#Recommended minimum configuration:
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8
acl localnet src 0.0.0.0/8 192.168.100.0/24 192.168.101.0/24
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
@sairion
sairion / ikea-availability.py
Last active October 20, 2017 17:20
get ikea availability data
# -*- coding: utf-8 -*-
import datetime
import requests
from xml.etree import ElementTree
# \n릴나겐 유리닦이 202.435.97 / 직원문의\n링셴 샤워커튼링 001.793.90 / 직원문의\n에게그룬드 샤워커튼 902.094.39 / 직원문의\n고드모르곤 양문형 거울장(총 3짝 사야함, 옆에 붙어있어도 문이 열리는지 확인) 702.189.96 / 직원문의\n알렉스 서랍유닛 801.928.25 / 11.19\n칼뷔 조리대 (나무 3종) 202.971.18 / 직원문의\n로그룬드 휴지스탠드 102.530.73 / 직원문의\n세베른 샤워 커튼봉 701.667.99 / 직원문의\n롱란 거울 402.886.98 / 직원문의\n오플란트 4칸 서랍장 302.691.53 / 품절\n오플란드 2칸 서랍장 202.691.44 / 직원문의\n드라간 욕실 수납함 2종 202.226.08 / 직원문의\n임멜른 비누받침 902.526.25 / 직원문의\n몰게르 거울 (80*60) 602.304.99 / 44.10\n비테묄라 벽부착등 102.835.03 / 품절\n(몰게르 벽선반이 없으면) 몰게르 선반장 702.673.93 / 32.10\n몰게르 벽선반 802.423.59 / 44.04\n".match(/(\d+\.\d+.\d+)/g).map(function(e){e.split('.').join('')})
item_ids = ["20243597", "00179390", "90209439", "70218996", "80192825", "20297118", "10253073", "70166799", "40288698", "30269153", "20269144", "20222608", "90252625", "60230499", "10283503", "70267393", "80242359", "40249961"]
item_query_result = [] # item_id, item_availability, validDate
@jorinvo
jorinvo / challenge.md
Last active November 19, 2024 02:40
This is a little challenge to find out which tools programmers use to get their everyday tasks done quickly.

You got your hands on some data that was leaked from a social network and you want to help the poor people.

Luckily you know a government service to automatically block a list of credit cards.

The service is a little old school though and you have to upload a CSV file in the exact format. The upload fails if the CSV file contains invalid data.

The CSV files should have two columns, Name and Credit Card. Also, it must be named after the following pattern:

YYYYMMDD.csv.

@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
@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
@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
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() {