Skip to content

Instantly share code, notes, and snippets.

View jinsnet's full-sized avatar

Jin Kim jinsnet

  • Wehome
  • GC, Australia
View GitHub Profile
@jinsnet
jinsnet / nas_disk_recovery
Created December 21, 2016 04:31
NAS DISK MOUNT
Use an USB enclosure and install the hard disk
Download Hiren’s Boot CD from here or Gparted :
Boot to the linux operating system by using Gparted
Select Linux based rescue environment
Press enter on Start
Try to access the partition. In my example the partition with the share folder was /dev/sdc6
When I opened up try to click on the partition, I received the following error message
udevil: /dev/sdc6 is known to mount – running mount as current user
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
//Create a new config file
/*
|--------------------------------------------------------------------------
| Number of databases in use
|--------------------------------------------------------------------------
|
| Using a Master and Slave. The Slave doubles as a read-only database.
<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TabWidget
package com.example.androidlab;
import java.util.ArrayList;
import java.util.List;
import android.content.ContentValues;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;
@jinsnet
jinsnet / gist:8467025
Created January 17, 2014 01:39
String to emoticon image
public SpannableString changeToEmoticon(Context context, String text)
{
SpannableString result = new SpannableString(text);
Pattern pattern = Pattern.compile("\\((.*?)\\)"); // 괄호안의 문자를 가져오는 정규식
Matcher match = pattern.matcher(text);
while(match.find()) // 문장에 포함된 모든 괄호 문자를 이미지로 변경
{
int start = match.start();
int end = match.end();
REDIS 소개
memory db
no-sql db 로 기본적으로 key 와 value 쌍의 형태로 데이타를 메모리에 저장한다.
메모리에 저장된 내용을 지속시키기 위해 파일로 싱크 하는 기능을 제공한다.
Data Types
redis 에는 5가지 데이타형이 존재하며, 이 5가지 데이타 형을 다루는 명령이 모두 다르다. 예를들어 string 형의 데이타를 저장하는 명령으로 저장한 key 는 hashes 형을 읽는 명령으로 읽을 수 없다.

Backend Architectures

ARCHITECTURES

ror, scala, jetty, erlang, thrift, mongrel, comet server, my-sql, memchached, varnish, kestrel(mq), starling, gizzard, cassandra, hadoop, vertica, munin, nagios, awstats