Skip to content

Instantly share code, notes, and snippets.

View wdshin's full-sized avatar

Wondong Shin wdshin

View GitHub Profile
@wdshin
wdshin / v1_user_follow.erl
Created June 25, 2021 06:26
Erlang 코드 맞보기 , SNS 에서 유저를 follow 하는 Request 처리
%%%-------------------------------------------------------------------
%%% @author 신원동 <wdshin@CTO-Wondong-Shin.local>
%%% @copyright (C) 2015, 신원동
%%% @doc
%%%
%%% @end
%%% Created : 22 Oct 2015 by 신원동 <wdshin@CTO-Wondong-Shin.local>
%%%-------------------------------------------------------------------
-module(v1_user_follow).
@wdshin
wdshin / cql_counter.erl
Created January 6, 2021 07:52
cql_counter.erl
%%%-------------------------------------------------------------------
%%% @author 신원동 <wdshin@CTO-Wondong-Shin.local>
%%% @copyright (C) 2015, 신원동
%%% @doc
%%%
%%% @end
%%% Created : 31 Aug 2015 by 신원동 <wdshin@CTO-Wondong-Shin.local>
%%%-------------------------------------------------------------------
-module(cql_counter).
package common
import (
"net"
"github.com/labstack/gommon/log"
"io"
"crypto/rand"
"time"
"sync/atomic"
"encoding/binary"
fn main() {
println!("Hello, World");
println!("Hello, {subject}", subject = "Mr. Shin");
}
test_dh() ->
DHParams = crypto:dh_generate_parameters(1024,2),
[ DH1, DH2 ] = DHParams,
%io:format("DHParams DH1(dh_generate_parameters(1024,2)) = ~p ~n",[bin2hex(DH1)]),
@wdshin
wdshin / KeyStoreHelper.java
Created June 15, 2017 05:22 — forked from alphamu/KeyStoreHelper.java
Using Android KeyStore to generate a password. The code create a public/private key pair and uses the base64 encoded form of the certificate to as the password. The code modified the KeystoreHelper class from AOSP demo projects.
/*
* Copyright 2013 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@wdshin
wdshin / gist:3549659
Created August 31, 2012 06:36
failed riak 1.2.0 on centos
[root@i-5921-31925-VM ~]# sudo rpm -Uvh riak-1.2.0-1.el6.x86_64.rpm
error: Failed dependencies:
libcrypto.so.10()(64bit) is needed by riak-1.2.0-1.el6.x86_64
libssl.so.10()(64bit) is needed by riak-1.2.0-1.el6.x86_64
libtinfo.so.5()(64bit) is needed by riak-1.2.0-1.el6.x86_64
rpmlib(FileDigests) <= 4.6.0-1 is needed by riak-1.2.0-1.el6.x86_64
rpmlib(PayloadIsXz) <= 5.2-1 is needed by riak-1.2.0-1.el6.x86_64
@wdshin
wdshin / gist:3496438
Created August 28, 2012 09:14
riak client load at runtime
code:load_file(riak),
code:load_file(riak_core_util),
code:load_file(riak_client),
@wdshin
wdshin / gist:d2b9ac864addaa62de9b
Created December 5, 2014 07:49
test_sendgrid.erl
url(v1,send_mail,json) ->
<<"https://sendgrid.com/api/mail.send.json">>.
url_encode(Data) ->
url_encode(Data,"").
url_encode([],Acc) ->
Acc;
url_encode([{Key,Value}|R],"") ->
%%%-------------------------------------------------------------------
%%% @author 신원동 <wodshin@gmail.com>
%%% @copyright (C) 2014, 신원동
%%% @doc
%%%
%%% @end
%%% Created : 4 Dec 2014 by 신원동 <wodshin@gmail.com>
%%%-------------------------------------------------------------------
-module(m_google_storage).