Skip to content

Instantly share code, notes, and snippets.

View SehoNoh's full-sized avatar
🇰🇷
Meow

Seho Noh SehoNoh

🇰🇷
Meow
  • Veluga Brewery inc. @velugabrewery
  • Seoul, South Korea
  • 19:37 (UTC +09:00)
View GitHub Profile
@SehoNoh
SehoNoh / fixed-aws-kinesis-agent-setup
Created January 15, 2019 12:55
Bugfix aws kinesis agent setup script
#! /usr/bin/env bash
# If we have an error, bail out!
set -e
# If we're debugging, be really loudly verbose
[[ ! -z $DEBUG ]] && set -x
# Attempt to load up the /etc/lsb-release file to determine our OS. If none is
# found, we default our settings to RHEL/Amazon Linux as the original behavior
@SehoNoh
SehoNoh / zsh.md
Created December 8, 2016 01:58 — forked from tsabat/zsh.md
Getting oh-my-zsh to work in Ubuntu
pip freeze | grep -v -f requirements.txt - | grep -v '^#' | xargs pip uninstall -y
@SehoNoh
SehoNoh / DynamicGridLayoutManager.java
Last active April 14, 2019 02:32
Android Dynamic RecyclerView LayoutManager (when you are using RecyclerView in ScrollView, these layout manager will resize RecyclerView's height with their items.) / ListView Version - https://gist.github.com/NohSeho/5638005fa27763fd21f8
import android.content.Context;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;
public class DynamicGridLayoutManager extends GridLayoutManager {
private int spanCount = 1;
@SehoNoh
SehoNoh / Issue.sh
Created June 8, 2015 00:53
ubuntu14.04 python3.4 pyvenv issue
sudo apt-get install libssl-dev zlibc zlib1g-dev
@SehoNoh
SehoNoh / sample.m
Created April 19, 2015 19:03
Objective-C x-www-form-urlencoded EUC-KR to NSString converting
NSString *result = [NSStringData stringByReplacingPercentEscapesUsingEncoding:0x80000000 + kCFStringEncodingDOSKorean];
public static void setListViewHeightBasedOnChildren(ListView listView) {
ListAdapter listAdapter = listView.getAdapter();
if (listAdapter == null) {
// pre-condition
return;
}
int totalHeight = 0;
int desiredWidth = MeasureSpec.makeMeasureSpec(listView.getWidth(), MeasureSpec.AT_MOST);
for (int i = 0; i < listAdapter.getCount(); i++) {
items.add(Environment.getExternalStorageDirectory() + "/DCIM/Camera/20140706_170122.jpg");
items.add(Environment.getExternalStorageDirectory() + "/DCIM/Camera/20140822_123456.jpg");
items.add(Environment.getExternalStorageDirectory() + "/DCIM/Camera/20140706_152135.jpg");
for (int count = 0; count < items.size(); count++) {
BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true;
try {
BitmapFactory.decodeFile(items.get(count), options);
float width;
@SehoNoh
SehoNoh / NewsfeedAdapter.java
Created August 16, 2014 11:23
ListView ViewPager
package com.artsquare.android.ui;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
#import <UIKit/UIKit.h>
@interface UITextFieldKeyboardIssues : UIViewController <UITextFieldDelegate>
{
CGRect screenRect;
CGFloat X;
CGFloat Y;
CGFloat WIDTH;
CGFloat HEIGHT;