Skip to content

Instantly share code, notes, and snippets.

chaeplin chaeplin

  • South Korea
Block or report user

Report or block chaeplin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@chaeplin
chaeplin / esp8266_rtc_mem_test.ino
Last active Mar 17, 2017
esp8266_rtc_mem_test.ino
View esp8266_rtc_mem_test.ino
/*
system_rtc_mem_write
Function:
During deep sleep, only RTC still working, so maybe we need to save some user data in RTC memory.
Only user data area can be used by user.
|<--------system data--------->|<-----------------user data--------------->|
| 256 bytes | 512 bytes |
Note:
RTC memory is 4 bytes aligned for read and write operations. Parameter des_addr means block number(4 bytes per block).
@chaeplin
chaeplin / installation.md
Created Mar 1, 2017 — forked from guillaumevincent/installation.md
A simple guide to install PyQt5 on Mac OS X 10.9 (Maverick) and use python 3.4 on a virtualenv.
View installation.md

Guide to install PyQt5 on Mac OS X with python 3.4 virtualenv

Description

A simple guide to install PyQt5 on Mac OS X 10.9 (Maverick) and use python 3.4 on a virtualenv.

Requirements

  • xcode 5.1.1
  • python 3.4.0
  • Qt libraries 5.2.1
View mcsentinel.py
#!/usr/bin/env python
import os
import sys
import math
import random
NSECONDS = 5*3600
NNODES = 4000
@chaeplin
chaeplin / Documentation.md
Created Feb 7, 2017 — forked from KartikTalwar/Documentation.md
Rsync over SSH - (40MB/s over 1GB NICs)
View Documentation.md

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
@chaeplin
chaeplin / nginx.conf
Created Jan 10, 2017 — forked from jrom/nginx.conf
nginx hack for multiple conditions
View nginx.conf
if ($request_uri = /) {
set $test A;
}
if ($host ~* teambox.com) {
set $test "${test}B";
}
if ($http_cookie !~* "auth_token") {
set $test "${test}C";
@chaeplin
chaeplin / keybase.md
Last active Nov 25, 2016
keybase.txt
View keybase.md

Keybase proof

I hereby claim:

  • I am chaeplin on github.
  • I am chaeplin (https://keybase.io/chaeplin) on keybase.
  • I have a public key whose fingerprint is 0C27 188A E29B E816 DC06 8714 193C 7345 272C 3075

To claim this, I am signing this object:

@chaeplin
chaeplin / nginx.conf
Created Aug 20, 2016 — forked from oroce/nginx.conf
nginx config for using grafana, elasticsearch and graphite with authentication.
View nginx.conf
user www-data;
worker_processes 1;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
sendfile on;
View nest.py
#!/usr/bin/env python2
# encoding: utf-8
import sys
import time
import httplib
import json
import re
url = "api.home.nest.com"
@chaeplin
chaeplin / ESP.getVcc.ino
Last active Jun 13, 2016
ESP.getVcc.ino
View ESP.getVcc.ino
extern "C" {
#include "user_interface.h"
}
ADC_MODE(ADC_VCC);
int vdd;
void setup() {
Serial.begin(115200);
View for_kozoke.ino
#include <ESP8266WiFi.h>
#include <ESP8266Ping.h>
#include <PubSubClient.h>
#include <Average.h>
#include <pgmspace.h>
#include <Wire.h>
#include <ESP8266mDNS.h>
#include <WiFiUdp.h>
#include <ArduinoOTA.h>
//#include "/usr/local/src/ap_setting.h" // comment out this line
You can’t perform that action at this time.