Skip to content

Instantly share code, notes, and snippets.

View iz4blue's full-sized avatar

김정환 iz4blue

View GitHub Profile
@iz4blue
iz4blue / locale.sh
Created November 23, 2015 12:21
ubuntu 명렁어 에러 날 때
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale-gen en_US.UTF-8
sudo dpkg-reconfigure locales
@iz4blue
iz4blue / touch-pos.py
Created September 22, 2015 01:56
RaspberryPi touch screen get pos
File Edit Options Buffers Tools Python Help
# -*- coding:utf-8 -*-
import pygame
import sys
import os.path
BLACK = ( 0, 0, 0)
WHITE = (255, 255, 255)
GRAY = (126, 126, 126)
SCREEN_WIDTH = 1280
# reading passphrase from stdin
network={
ssid="AirPort Time Capsule"
#psk="01012341234"
psk=fsdfsafsf
}
@iz4blue
iz4blue / update-all-hosts.sh
Created July 30, 2015 09:01
svn update hosts
#!/bin/bash
WEBSERVERS[1]="1.1.1.1"
SHELLUSER=userid
SVN_USER=svn_user
SVN_PASSWD=svn_password
COMMAND="svn update /var/www/htdocs --username $SVN_USER --password $SVN_PASSWD"
for HOST in "${WEBSERVERS[@]}"
@iz4blue
iz4blue / views.py
Last active August 29, 2015 14:26
이걸 좀더 깔끔하게 바꿔 보자!
from django.shortcuts import render
from django.http import HttpResponse
from django.shortcuts import render, redirect
from polls.forms import PollForm
from polls.models import PollInfo, Poll
import re
class PHPSession:
data = None
@iz4blue
iz4blue / connect-x11.sh
Created July 21, 2015 07:50
X11 이 덜 끊어지도록 작업하기
ssh -o ServerAliveInterval=30 -o ForwardX11Timeout=8h -X iz4blue@targetserver.com
@iz4blue
iz4blue / UTF-8.sh
Created July 21, 2015 06:27
bash 에서 UTF-8 을 재대로 쓰기 위한 작업
export LANG=en_US.UTF-8
export LC_CTYPE=en_US.UTF-8
@iz4blue
iz4blue / script.py
Created July 3, 2015 00:27
python 질문 답변
#!/usr/bin/env python
#-*- coding: utf-8 -*-
prices = {
"banana": 4,
"apple": 2,
"orange": 1.5,
"pear": 3,
}
stock = {
@iz4blue
iz4blue / find-synology.js
Created July 2, 2015 01:22
synology find javascript source
<html>
<head>
<title>Synology Web Assistant</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="google" content="notranslate" />
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<meta name="viewport" content="initial-scale=1.0; maximum-scale=1.0;"/>
<link rel="stylesheet" type="text/css" href="./extjs/resources/css/ext-all.css?v=0029" />