Skip to content

Instantly share code, notes, and snippets.

View teslamint's full-sized avatar
💭
I may be slow to respond.

Jaehoon You teslamint

💭
I may be slow to respond.
View GitHub Profile
@teslamint
teslamint / README.md
Last active January 8, 2016 12:19 — forked from oodavid/README.md

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by nginx
  • nginx's home directory is /var/www/
@teslamint
teslamint / 0001-update-coova-chilli-to-1.3.0-add-kmod-coova-package.patch
Last active August 29, 2015 14:06
[PATCH][package] AA: update coova-chilli to 1.3.0 and add kmod-coova package
From 2a7568d17915edd283a71f4cc4d4c71d066df912 Mon Sep 17 00:00:00 2001
From: Jaehoon You <[email protected]>
Date: Fri, 25 Apr 2014 17:00:48 +0900
Subject: [PATCH] update coova-chilli to 1.3.0; add kmod-coova package;
Based on David Bird's patch: https://lists.openwrt.org/pipermail/openwrt-devel/2012-December/018075.html
Signed-off-by: Jaehoon You <[email protected]>
---
@teslamint
teslamint / install_tcpdump.sh
Last active February 9, 2017 05:28
install tcpdump on /tmp
#!/bin/sh
# fix opkg package url
sed -i '[email protected]@12.09@g' /etc/opkg.conf
# install libpcap and tcpdump
/bin/opkg update
/bin/opkg install tcpdump --add-dest temp:/tmp -d temp
# link libpcap and tcpdump
@teslamint
teslamint / tplink.sh
Created November 28, 2013 08:24
TP-LINK Firmware flashing script by attila.lendvai from http://wiki.openwrt.org/toh/tp-link/tl-wr1043nd#oem.mass.flashing (rev. 1336694829) CC-BY-SA 3.0
@teslamint
teslamint / coova-1.3.0-custom.patch
Last active December 18, 2015 22:38
modified version of coova-chilli patch for OpenWrt. This patch re-add firewall rules when reload firewall. https://lists.openwrt.org/pipermail/openwrt-devel/2012-December/018075.html
Index: files/chilli.init
===================================================================
--- files/chilli.init (리비전 0)
+++ files/chilli.init (리비전 0)
@@ -0,0 +1,61 @@
+#!/bin/sh /etc/rc.common
+
+START=30
+STOP=90
+
@teslamint
teslamint / chilli.sh
Created June 11, 2013 07:29
OpenWrt firewall script for coova-chilli. use patch in https://lists.openwrt.org/pipermail/openwrt-devel/2012-December/018075.html and place this chilli.sh into /lib/firewall/
#!/bin/sh
chilli_firewall() {
local cfg="$1"
local tun ipup addr mask net dhcpif uamport uamuiport
config_get tun "$cfg" tundev
config_get ipup "$cfg" ipup
config_get addr "$cfg" uamlisten
config_get net "$cfg" net
@teslamint
teslamint / dir615i1-ddwrt.cap
Last active December 14, 2015 18:09
DIR-615 Ix bootlog
U-Boot 1.1.4 Rev: 350 (Apr 2 2012 - 18:26:52)
U-boot AP123
DRAM: 32 MB
Top of RAM usable for U-Boot at: 82000000
Reserving 156k for U-Boot at: 81fd8000
Reserving 192k for malloc() at: 81fa8000
Reserving 44 Bytes for Board Info at: 81fa7fd4
@teslamint
teslamint / .screenrc
Created February 14, 2013 09:22
my .screenrc
hardstatus on
hardstatus alwayslastline
hardstatus string "%{.bW}%-w%{.rW}%n %t%{-}%+w %=%{..G} %H %{..Y} %m/%d %C%a "
@teslamint
teslamint / log.php
Last active October 10, 2015 02:48
custom log function for CodeIgniter
<?php
class example extends CI_Controller {
/**
* leave log message
*
* @access private
* @param string $func (default: __FUNCTION__)
* @param string $level (default: 'debug')
* @param string $message (default: '')
* @return void
@teslamint
teslamint / MY_Model.php
Last active October 9, 2015 14:27
CodeIgniter CI_Model extended
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* extended CI_Model
*
* @access public
* @extends CI_Model
* @see http://thetechnofreak.com/technofreak/hook-system-php/ for hook system reference
*/
class MY_Model extends CI_Model {