Skip to content

Instantly share code, notes, and snippets.

View dobestan's full-sized avatar

Suchan An dobestan

View GitHub Profile
import os
SOURCE_DIR = "src/"
DEST_DIR = "dest/"
RESULT_FILE = "bundle.fasta"
def parse_fasta(source_file, dest_file):
import os
SOURCE_DIR = "src/"
DEST_DIR = "dest/"
RESULT_FILE = "bundle.fasta"
def parse_fasta(source_file, dest_file):
@dobestan
dobestan / client.rb
Created February 8, 2014 13:57
Ruby Socket Client/Server
require 'socket'
require 'pry'
socket = TCPSocket.new 'localhost', 2000
while line = socket.gets
puts line
end
socket.close
@dobestan
dobestan / gist:9187003
Created February 24, 2014 11:52
using javascript function without onclick attribute | @joohee
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<!-- 2w1m3. 데이터베이스에 추가한 데이터를 조회할 수 있는 페이지를 구현한다. -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
#include <sys/socket.h> /* socket definitions */
#include <sys/types.h> /* socket types */
#include <arpa/inet.h> /* inet (3) funtions */
#include <unistd.h> /* misc. UNIX functions */
#include "helper.h" /* our own helper functions */
#include <stdlib.h>
#include <stdio.h>
#include <sys/socket.h> /* socket definitions */
#include <sys/types.h> /* socket types */
#include <arpa/inet.h> /* inet (3) funtions */
#include <unistd.h> /* misc. UNIX functions */
#include "helper.h" /* our own helper functions */
#include <stdlib.h>
#include <stdio.h>
@dobestan
dobestan / SB1.java
Last active August 29, 2015 13:57
@안수빈
class SB1 {
public static void main(String[] args) {
int x = 2;
int y = 5;
if ( ( x > 3 ) && ( y < 2 ) | doStuff() )
// 일단 &&와 &의 차이는 얼마나 연산에 최적화가 되어있는가에 대한 차이인데,
// &&(AND)가 같은 경우에는 앞의 x && y가 x가 거짓이면 절대로 참일 수가 없기 때문에 y를 보지도 않고 그냥 넘어감
// &(AND)같은 경우에는 그래도 끝까지 실행은 시키는거라고 생각하면 된다.
// 첨부한 이미지 참조
@dobestan
dobestan / gist:2edbe7b785094d6664f7
Last active August 29, 2015 14:03
Markdown Syntax ( Raw )
#h1
##h2
###h3
####h4
#####h5
######h6
*italic*
**bold**
@dobestan
dobestan / init.sh
Created July 10, 2014 14:18
Ubuntu 14.04 LTS 64bit ( Trusty64 ) + LAMP + Xeroboard Installation with Vagrant
apt-get update
apt-get upgrade -y
echo "**************************"
echo "Installing Build-Essential"
echo "**************************"
apt-get install build-essential git -y
echo "***********************"
echo "Installing MySQL"
@dobestan
dobestan / gist:caf306d4f70009efce54
Created July 25, 2014 13:49
Chrome not working with "ignore-certificate-errors" : solved with custom options
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from django.test import LiveServerTestCase
options = webdriver.ChromeOptions()
options.add_experimental_option("excludeSwitches", ["ignore-certificate-errors"])
class AdminTest(LiveServerTestCase):
def setUp(self):