Skip to content

Instantly share code, notes, and snippets.

View suhanlee's full-sized avatar
:octocat:
Focusing

kyle suhanlee

:octocat:
Focusing
View GitHub Profile
@suhanlee
suhanlee / react-native-alert.js
Created October 15, 2016 03:27
react-native example
import React, { Component } from 'react';
import { AppRegistry, View, TouchableHighlight, Text, Alert } from 'react-native';
// corporate ipsum > lorem ipsum
var alertMessage = 'Credibly reintermediate next-generation potentialities after goal-oriented ' +
'catalysts for change. Dynamically revolutionize.';
class AlertApp extends Component {
constructor(props) {
super(props)
@suhanlee
suhanlee / server.rb
Created October 17, 2016 08:37
Sinatra local directory server
require 'sinatra'
$pwd = ENV['PWD']
configure do
set :server, :puma
set :root, File.dirname(__FILE__)
set :port, 7777
end
@suhanlee
suhanlee / ko.yml
Last active January 5, 2017 15:54
Rails i18n yml files
ko:
datetime:
distance_in_words:
less_than_x_seconds: "%{count}초 전"
less_than_x_minutes: "%{count}분 전"
half_a_minute: "30초 전"
x_minutes: "%{count}분 전"
about_x_hours: "%{count}시간 전"
x_days: "%{count}일 전"
about_x_months: "%{count}달 전"
@suhanlee
suhanlee / AndroidManifest.xml
Created December 27, 2016 14:10
Android Launcher Badge
<!-- Samsung -->
<uses-permission android:name="com.sec.android.provider.badge.permission.READ" />
<uses-permission android:name="com.sec.android.provider.badge.permission.WRITE" />
<!-- Sony -->
<uses-permission android:name="com.sonyericsson.home.permission.BROADCAST_BADGE" />
<!-- HTC -->
<uses-permission android:name="com.htc.launcher.permission.READ_SETTINGS" />
<uses-permission android:name="com.htc.launcher.permission.UPDATE_SHORTCUT" />
@suhanlee
suhanlee / layout01.js
Created January 5, 2017 07:16
React-native layout exam1
import React, { Component } from 'react';
import { StyleSheet, AppRegistry, Text, TextInput, View } from 'react-native';
class Hello extends Component {
render() {
return (
<View style={styles.layout}>
<Text>번호를 입력하세요</Text>
<View style={{width: 200, height: 50, backgroundColor: 'skyblue'}}>
<TextInput style={styles.item}
@suhanlee
suhanlee / Gemfile
Created April 5, 2017 18:15
rails-capybara
group :development, :test do
gem 'capybara'
gem 'selenium-webdriver', '~> 3.3.0'
end
@suhanlee
suhanlee / ffserver.conf
Last active April 18, 2017 08:17
ffmpeg
Port 8090
# bind to all IPs aliased or not
BindAddress 0.0.0.0
# max number of simultaneous clients
MaxClients 1000
# max bandwidth per-client (kb/s)
MaxBandwidth 100000
<Feed feed1.ffm>
File /tmp/feed1.ffm
@suhanlee
suhanlee / fluent.conf
Last active May 12, 2017 09:30
fluentd/fluent.conf
<match slack>
@type slack
webhook_url https://hooks.slack.com/services/XXXXXXXX
channel logs
username suhanlee
icon_emoji :ghost:
flush_interval 60s
message_keys messages
</match>
@suhanlee
suhanlee / create_user_db.sh
Created May 10, 2017 16:08
PostgreSQL Script
* create postgresql user
$ createuser -P -d -e [user]
* create database on user
$ createdb -O [user] [user_database_name]
@suhanlee
suhanlee / example1.rb
Last active August 25, 2017 10:06
simple-em-synchrony-http-example
require 'pp'
require 'em-synchrony'
require 'em-synchrony/em-http'
require 'em-synchrony/fiber_iterator'
POST_URL = "http://localhost:4567/post_test"
GET_URL = "http://localhost:4567/get_test"
EM.synchrony do
1.times do |n|