Skip to content

Instantly share code, notes, and snippets.

View bskim45's full-sized avatar

Bumsoo Kim bskim45

View GitHub Profile
@bskim45
bskim45 / circle.yml
Last active August 31, 2016 02:33 — forked from h0lyalg0rithm/circle.yml
Android CircleCI Build config
#Install android build tools, platforms
#Supported versions here https://circleci.com/docs/android
dependencies:
override:
- echo y | android update sdk --no-ui --all --filter tools,platform-tools,build-tools-24.0.2,android-23,extra-google-m2repository,extra-google-google_play_services,extra-android-m2repository
- ANDROID_HOME=/usr/local/android-sdk-linux ./gradlew dependencies
#Pull any submodules
checkout:
post:
#
# Circle CI & gradle.properties live in harmony
#
# Android convention is to store your API keys in a local, non-versioned
# gradle.properties file. Circle CI doesn't allow users to upload pre-populated
# gradle.properties files to store this secret information, but instaed allows
# users to store such information as environment variables.
#
# This script creates a local gradle.properties file on current the Circle CI
# instance. It then reads environment variable TEST_API_KEY_ENV_VAR which a user
@bskim45
bskim45 / Android CI.md
Created September 13, 2016 18:41 — forked from JvmName/Android CI
Android CI

#Android and CI and Gradle (A How-To)

There are tech stacks in this world that make it dead simple to integrate a CI build system.
The Android platform is not one of them.

Although Gradle is getting better, it's still a bit non-deterministic, and some of the fixes you'll need will start to feel more like black magic than any sort of programming.

But fear not! It can be done!

Before we embark on our journey, you'll need a few things to run locally:

@bskim45
bskim45 / CryptGenRandom.cpp
Created October 13, 2016 01:24 — forked from kbjorklu/CryptGenRandom.cpp
Sample code for the CryptGenRandom function.
#include <iostream>
#include <windows.h>
#pragma comment(lib, "advapi32.lib")
int main()
{
HCRYPTPROV hProvider = 0;
if (!::CryptAcquireContextW(&hProvider, 0, 0, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT | CRYPT_SILENT))
return 1;
@bskim45
bskim45 / singleton.cpp
Created December 27, 2016 02:33
Simple C++ Singleton Example
// C++ 11 way, thread-safe version, guaranteed to be destroyed.
// For further details, see §6.7 [stmt.dcl] p4 of C++ 11 standard
class Singleton
{
public:
static Singleton& instance();
Singleton(Singleton const&) = delete; // Don't forget to disable copy
void operator=(Singleton const&) = delete; // Don't forget to disable copy

Keybase proof

I hereby claim:

  • I am bskim45 on github.
  • I am bskim45 (https://keybase.io/bskim45) on keybase.
  • I have a public key whose fingerprint is 5F9B EE3E 8AE2 8666 03D3 DCF9 24F4 8870 6F28 783F

To claim this, I am signing this object:

@bskim45
bskim45 / pjson.h
Created May 31, 2017 04:03
pjson.h - Super fast JSON parser, with Ensemble-style DOM by Rich Geldreich
// File: pjson.h - written by Rich Geldreich 2012 - License: Unlicense http://unlicense.org/
#ifndef PURPLE_JSON_H
#define PURPLE_JSON_H
#ifdef WIN32
#pragma once
#endif
#include <string>
#include <vector>

Keybase proof

I hereby claim:

  • I am bskim45 on github.
  • I am bskim45 (https://keybase.io/bskim45) on keybase.
  • I have a public key whose fingerprint is 5F9B EE3E 8AE2 8666 03D3 DCF9 24F4 8870 6F28 783F

To claim this, I am signing this object:

@bskim45
bskim45 / .profile
Created September 10, 2017 09:10 — forked from bmhatfield/.profile
Automatic Git commit signing with GPG on OSX
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else
@bskim45
bskim45 / Team.json.postman_collection
Created November 29, 2017 00:50 — forked from udayms/Team.json.postman_collection
ElasticSearch - Postman Collection to create an Index and insert ~10k records into it.
This file has been truncated, but you can view the full file.
{
"id": "124e573f-bc1b-4d9a-a7ec-c4c17f2095e1",
"name": "Team",
"description": "",
"order": [
"0fa78cfe-0d72-19c6-3ac7-b299a3e95540",
"57194727-54b8-caa3-bb58-c78f0cfcb32f",
"c36dccba-09af-3b85-f3d0-b3bfb925dd59",
"34bea456-2f76-d5ea-f39a-0305ed2bab4e",
"4b5a2548-c9ab-73bb-13d5-e35d256a4e19",