Skip to content

Instantly share code, notes, and snippets.

View rajephon's full-sized avatar
📡
🛰

Chanwoo Noh rajephon

📡
🛰
View GitHub Profile
@rajephon
rajephon / push.py
Last active August 20, 2017 06:49 — forked from ndfred/push.py
A simple standalone script to test an Apple Push Notification setup
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
A simple standalone script to test an Apple Push Notification setup.
Uses the feedback packets to provide the best information on how to fix things.
Steps to send a push notification:
@rajephon
rajephon / simple-calculator-in-c.cpp
Created August 20, 2017 07:13
C언어로 작성된 사칙연산(+-*/)과 괄호까지 연산 가능한 콘솔 계산기입니다.
//
// simple-calculator-in-c.cpp
// simple-calculator-in-c
/*
MIT License
Copyright (c) 2016 Chanwoo Noh [email protected]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@rajephon
rajephon / wol_for_d_link_router.py
Created August 20, 2017 09:45
D-Link 공유기를 이용중인 환경에서의 PC 원격 부팅(WOL)을 간단하게 만들어줍니다.
@rajephon
rajephon / main.cpp
Created November 29, 2017 00:51
C++ virtual inheritance test
class A {
public:
virtual ~A() = default;
virtual void print()=0;
};
class B : public virtual A {
public:
virtual ~B() = default;
virtual void printB()=0;
@rajephon
rajephon / log.h
Last active November 27, 2019 05:54
Print log with function name in android ndk.
#ifndef TEST_ANDROID_LOG_H
#define TEST_ANDROID_LOG_H
#include <android/log.h>
#define LOG_TAG "NDK_TEST"
#define LOGUNK(...) Log::unk( __func__ , Log::toString(__VA_ARGS__))
#define LOGDEF(...) Log::def( __func__ , Log::toString(__VA_ARGS__))
#define LOGV(...) Log::v(__func__ , Log::toString(__VA_ARGS__))
#define LOGD(...) Log::d(__func__ , Log::toString(__VA_ARGS__))
@rajephon
rajephon / build_NodogSplash.sh
Last active February 26, 2018 07:42
OpenWRT nodogsplash build
# Install dependencies
sudo apt-get install subversion g++ zlib1g-dev build-essential git python
sudo apt-get install libncurses5-dev gawk gettext unzip file libssl-dev wget
sudo apt-get install binutils bzip2 flex perl make libz3-dev
#clone nodogsplash
git clone https://github.com/nodogsplash/nodogsplash/
cd ./nodogsplash
# 원하는 버전으로 checkout
@rajephon
rajephon / app.js
Created May 20, 2018 09:25
slack weather bot
var schedule = require('node-schedule');
const { RTMClient, WebClient } = require('@slack/client');
var weather = require('weather-js');
const token = '<#YOUR-SLACK-TOKEN#>';
const rtm = new RTMClient(token);
const web = new WebClient(token);
rtm.start();
var sendMessage = function(text, ch) {