Skip to content

Instantly share code, notes, and snippets.

View kyungw00k's full-sized avatar
👋

Kyungwook, Park kyungw00k

👋
View GitHub Profile
@kyungw00k
kyungw00k / gist:7c92b76d71db460f2b7b
Created May 27, 2015 08:46
bootstrap hack: fix content width inside hidden tabs
/* bootstrap hack: fix content width inside hidden tabs */
.tab-content > .tab-pane,
.pill-content > .pill-pane {
display: block; /* undo display:none */
height: 0; /* height:0 is also invisible */
overflow-y: hidden; /* no-overflow */
}
.tab-content > .active,
.pill-content > .active {
height: auto; /* let the content decide it */
# Regenerate A Id_rsa.pub Key From A Private Id_rsa Key
ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub
@kyungw00k
kyungw00k / logback.xml
Last active February 28, 2025 14:05
logback & logstash pattern for elasticsearch
<?xml version="1.0" encoding="UTF-8"?>
<!-- For assistance related to logback-translator or configurations -->
<!-- files in general, please contact the logback user mailing list -->
<!-- at http://www.qos.ch/mailman/listinfo/logback-user -->
<!-- -->
<!-- For professional support please see -->
<!-- http://www.qos.ch/shop/products/professionalSupport -->
<!-- -->
<configuration>
Copyright (C) ${project.inceptionYear} ${owner} (${email})
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
distributed under the License is distributed on an "AS IS" BASIS,
public class Dexter {
private static String optimizedDirectory = "optimized";
private static String workDirectory = "working";
public static void loadFromAssets(Context context, String fileName) throws Exception {
File optimized = new File(optimizedDirectory);
optimized = context.getDir(optimized.toString(), Context.MODE_PRIVATE);
optimized = new File(optimized, fileName);
//
// !!WARNING: Not recommended for production code!!
//
public class ClassLoaderActivity extends Activity
{
public void onCreate(Bundle savedInstanceState)
{
// file.jar has a dex'd "classes.dex" entry that you can generate with "dx" from any number of JARs or class files
ClassLoader dexLoader = new DexClassLoader("/path/to/file.jar", getCacheDir().getAbsolutePath(), null, getClassLoader());
setAPKClassLoader(dexLoader);
/* Your Android Config Here */
/* Spoon Configuration */
repositories { mavenCentral() }
configurations { spoon }
dependencies { spoon 'com.squareup.spoon:spoon-runner:1.0.5' }
def buildDirPath = project.buildDir.path
def apk = buildDirPath + '/apk/' + project.name + '-debug-unaligned.apk'
buildscript {
repositories {
// rather than hit central each time with this:
// mavenCentral()
// we hit our company Nexus server ont he public group
// which includes the Central Repository
// and is local, so more performant
maven {
url "http://localhost:8081/nexus/content/groups/public"
}
@kyungw00k
kyungw00k / app.js
Created July 24, 2013 09:37
Migrate Wordpress to Haroopress using XML-RPC in NodeJS
var conf = require('./config.js')
, wp = require('wordpress')
;
// TODO Account Validation
// TODO Make Output Directories
//
// Client Instance
@kyungw00k
kyungw00k / install_rabbitmq_on_rhel5.sh
Created June 18, 2013 06:52
Install RabbitMQ on RHEL/CentOS 5
#!/bin/sh
#
# Install RabbitMQ on RHEL/CentOS 5
#
# Enable EPEL
wget -O /tmp/epel-release-5-4.noarch.rpm http://ftp.riken.jp/Linux/fedora/epel/5/i386/epel-release-5-4.noarch.rpm
rpm -ivh /tmp/epel-release-5-4.noarch.rpm