Skip to content

Instantly share code, notes, and snippets.

View KennethanCeyer's full-sized avatar
🤣
Making freaking awesome stuff

Sungmin Han KennethanCeyer

🤣
Making freaking awesome stuff
View GitHub Profile
@KennethanCeyer
KennethanCeyer / gist:687b9aedc7cd95927efc
Created October 28, 2015 22:43
Implements of BaseAdapter model
public class CheckBoxAdapter extends BaseAdapter {
@Override
public int getCount() {
return 0;
}
@Override
public Object getItem(int position) {
return null;
}
@KennethanCeyer
KennethanCeyer / index.js
Last active January 21, 2016 16:46
AWS Lambda isn't supporting "yum install command".
var fs = require('fs');
var url = require('url');
var https = require('https');
var exec = require('child_process').exec;
var simpleGit = require('simple-git')();
var archiver = require('archiver');
var token = '[Your GitHub OAuth Token]';
var file_name = './deploy';
var version = '122632';
public class UserTable {
public int user_pk { get; set; }
public int user_age { get; set; }
public string user_name { get; set; }
public Datetime user_birth { get; set; }
public UserGenderFlag user_gender { get; set; }
}
public enum UserGenderFlag {
Man,
protected override void Initialize(RequestContext requestContext)
{
base.Initialize(requestContext);
string domain = Dns.GetHostEntry(this.Request.UserHostName).HostName;
string[] segments = domain.Split('.');
string subdomain = "";
if(segments.Length >= 3)
{
subdomain = segments[0];
@KennethanCeyer
KennethanCeyer / websocket-elb.md
Created September 9, 2016 13:47 — forked from zhiguangwang/websocket-elb.md
Configure websockets behind an AWS ELB.
@KennethanCeyer
KennethanCeyer / ELBv2Sample.cs
Created September 12, 2016 01:49 — forked from guitarrapc/ELBv2Sample.cs
Amazon Application Elastic Load Balancing (ELB v2) C# Sample with HTTPS -> HTTP (HTTPS by ACM Certificate)
using Amazon.CertificateManager
using Amazon.EC2
using Amazon.ElasticLoadBalancingV2
using Amazon.ElasticLoadBalancingV2.Model
using System.Net.Http
using System.Threading.Tasks
using System.Windows.Forms.DataVisualization.Charting
public class Program
{
@KennethanCeyer
KennethanCeyer / Install-ARRFromWeb.ps1
Last active September 13, 2016 05:45 — forked from anderssonjohan/Install-ARRFromWeb.ps1
ARR Install script for AWS Beasntalk extension working on PowerShell. (This code working on AWS Beasntalk instance. (IIS 8.5, Windows 2012 RC2))
begin {
$TargetPath = $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath(‘.\’)
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
choco install curl
$packages = @( `
@{ Name = "webfarm.msi"; Url = "https://download.microsoft.com/download/F/E/2/FE2E2E07-22B5-4875-9A36-8B778D157F91/WebFarm2_x64.msi" }, `
@{ Name = "rewrite.msi"; Url = "https://download.microsoft.com/download/6/7/D/67D80164-7DD0-48AF-86E3-DE7A182D6815/rewrite_2.0_rtw_x64.msi" }, `
@{ Name = "arr.msi"; Url = "https://download.microsoft.com/download/E/9/8/E9849D6A-020E-47E4-9FD0-A023E99B54EB/requestRouter_amd64.msi" }
)
@KennethanCeyer
KennethanCeyer / complex_group_linq.cs
Created December 13, 2016 07:45
This is a guideline to how make to complex linq for applied the group clause in the models.
class TestModel
{
public int columnA;
public int columnB;
public int columnC;
public string columnD;
}
[HttpPost]
public JsonResult ModelLoad()
@KennethanCeyer
KennethanCeyer / cursor_for_fetch_persistent_part.py
Created December 13, 2016 13:42
Inconvenience things of python.
# this is only for examination.
query = "SELECT * from information_schema.tables"
cursor.execute(query)
# why we must use those logic more.
columns = cursor.description
result = []
for value in cursor.fetchall():
tmp = {}
@KennethanCeyer
KennethanCeyer / install_zsh.sh
Created February 3, 2017 16:43
Installation zsh for MAC platform with Homebrew.
# First of all, You must fetch your repository infomations for install latest package version.
brew update
brew install zsh