Skip to content

Instantly share code, notes, and snippets.

View jen6's full-sized avatar
πŸ”
Growing Faster

SonGeon jen6

πŸ”
Growing Faster
View GitHub Profile
readInts :: IO [Int]
readInts = fmap (take 3 . map read.words) getLine
camping n = do
(x:y:z:[]) <- readInts
if not $ z == 0
then
do
let day = ((z `div` y) * x + (z `mod` y))
putStrLn $ "Case " ++ (show n) ++ ": " ++ (show day)
#include <iostream>
static int w[] = {20,20,20};
static int x0 = 1;
const int kwAdd = 5;
bool twoPercep(int x1, int x2)
{
int x[3] = {0,};
set nocompatible
set nu
set ts=8
set sw=4
set sts=4
set tabstop=4
set smartindent
set autoindent
set t_Co=256
syntax on
import subprocess
#import urllib
from urllib.parse import urlencode
from urllib.request import Request, urlopen
from urllib.error import URLError, HTTPError
import time
import json
kHerokuUrl = "http://lit-castle-67838.herokuapp.com"
delayTime = 5
@jen6
jen6 / amazing.go
Last active November 24, 2017 09:49
for i, clink := range childLinks {
rch := make(chan interface{})
resultChannels[i] = rch
duplicateLink, ok := linkMap.Load(clink.FullLink)
if ok {
fmt.Println("-----------------------")//if remove 26 sec | now 12 sec
*clink = *duplicateLink.(*link.Link)
go func() {
rch <- struct{}{}
@jen6
jen6 / .tmux.conf
Created January 18, 2018 02:33 — forked from tsl0922/.tmux.conf
vim style tmux config
# use C-a, since it's on the home row and easier to hit than C-b
set-option -g prefix C-a
unbind-key C-a
bind-key C-a send-prefix
set -g base-index 1
# Easy config reload
bind-key R source-file ~/.tmux.conf \; display-message "tmux.conf reloaded."
# vi is good
#include <iostream>
#include <fstream>
#include <vector>
const std::string KFILE_NAME = "./intlist.txt";
static long long inverse_counter = 0;
template <class VecIter>
auto merge(VecIter iter_begin, VecIter iter_middle, VecIter iter_end){
size_t iter_dis = std::distance(iter_begin, iter_end);
@jen6
jen6 / README.md
Created March 6, 2019 06:35 — forked from gdamjan/README.md
Setup for an easy to use, simple reverse http tunnels with nginx and ssh. It's that simple there's no authentication at all. The end result, a single ssh command invocation gives you a public url for your web app hosted on your laptop.

What

A lot of times you are developing a web application on your own laptop or home computer and would like to demo it to the public. Most of those times you are behind a router/firewall and you don't have a public IP address. Instead of configuring routers (often not possible), this solution gives you a public URL that's reverse tunnelled via ssh to your laptop.

Because of the relaxation of the sshd setup, it's best used on a dedicated virtual machine just for this (an Amazon micro instance for example).

Requirements

#!/bin/bash
if [ "$#" -lt 2 ]; then
echo "$# is Illegal number of parameters."
echo "Usage: $0 [input.csv] [kakao rest api key]"
exit 1
fi
while read LINE; do
RESULT=`curl -vs -X GET "https://dapi.kakao.com/v2/local/search/address.json"\
@jen6
jen6 / staruml.png
Last active April 2, 2019 09:41
garage_open_system
staruml.png