Skip to content

Instantly share code, notes, and snippets.

@oojikoo-gist
oojikoo-gist / android_radar_ui.java
Created October 22, 2015 15:18
android: radar ui
/*
* Copyright (C) 2008 Google Inc.
*
* 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
@oojikoo-gist
oojikoo-gist / android_radar_ui_2
Created October 22, 2015 15:20
android: radar_ui 2
# https://github.com/phishman3579/android-augment-reality-framework/blob/master/src/com/jwetherell/augmented_reality/ui/Radar.java
package com.jwetherell.augmented_reality.ui;
import android.graphics.Canvas;
import android.graphics.Color;
import com.jwetherell.augmented_reality.activity.AugmentedReality;
import com.jwetherell.augmented_reality.camera.CameraModel;
import com.jwetherell.augmented_reality.common.Orientation.ORIENTATION;
@oojikoo-gist
oojikoo-gist / rails_google_play_verification.rb
Last active November 1, 2015 01:27
rails: google play verification
class GooglePlayVerification
require 'google/api_client'
# Refer: http://jonathanotto.com/blog/google_oauth2_api_quick_tutorial.html
GOOGLE_KEY = 'xxxcc.apps.googleusercontent.com'
GOOGLE_SECRET = 'abcd'
ACCESS_TOKEN = 'abcd'
REFRESH_TOKEN = 'abcd'
APP_NAME = 'StockLight'
APP_VERSION = '1.0.1'
@oojikoo-gist
oojikoo-gist / rails_in_app_billing.rb
Created November 1, 2015 02:22
rails: in app billing server verify
ISSUER = '362508889713-np8nvipb8cank17t68i4ekggvcm3ogd5.apps.googleusercontent.com'
APP_NAME = 'ossumapp' # This value didn't seem to matter. I think it is for logging
APP_VERSION = '0.9.0' # This value didn't seem to matter. I think it is for logging
GOOGLE_API_KEY = 'AIzaSyAVMfAxfWmHaUzVy8IXjuGpM9U3ciW81cU'
class Billing
def self.google_api_client
@@google_client ||= Google::APIClient.new(
application_name: APP_NAME,
application_version: APP_VERSION
).tap do |client|
@oojikoo-gist
oojikoo-gist / base_controller.rb
Last active June 25, 2022 23:02
rails: rails_cors
class API::V1::BaseController < ApplicationController
skip_before_filter :verify_authenticity_token
before_filter :cors_preflight_check
after_filter :cors_set_access_control_headers
def cors_set_access_control_headers
headers['Access-Control-Allow-Origin'] = '*'
headers['Access-Control-Allow-Methods'] = 'POST, GET, PUT, DELETE, OPTIONS'
@oojikoo-gist
oojikoo-gist / symbol_description.md
Created December 18, 2015 01:38
etc: symbol description

~ Tilde (틸드) [흔히 물결마크라고 하지요.] ! Exclamation Point (엑스클러메이션 포인트) [느낌표라고 많이 말합니다.] @ At Sign /Commercial At (앳 사인, 혹은 앳/커머셜 앳) [골뱅이~ 라고 많이 사용합니다]

Crosshatch/Sharp/Pound Sign (크로스해치/샵/파운드 사인) [우물 정... 친근하죠?]

$ Dollar Sign (달러사인) [달러 마크? 라고 사용하지요] % Percent Sign (퍼센트사인) [퍼센트 라고 사용하지용] ^ Circumflex (서컴플렉스) [요건.. 6 자 위에 마크 라고 전 했음..] & Ampersand (앰퍼샌드) [엔드 마크 라고 많이 사용~]

  • Asterisk (애스터리스크) [별표!!! ㅎㅎ] ( Left Parenthesis (레프트 퍼렌씨시스) [괄호 열기...]
@oojikoo-gist
oojikoo-gist / .gitignore
Last active January 14, 2016 08:06
rails: gitignore
# Created by https://www.gitignore.io/api/rails
### Rails ###
*.rbc
capybara-*.html
.rspec
/log
/tmp
/db/*.sqlite3
/db/*.sqlite3-journal
@oojikoo-gist
oojikoo-gist / rails_bundle_erorr_elcapitan.txt
Created January 6, 2016 03:30
rails: bundle error on El Capitan
If..
bundle install will not work with if you because you recently updated to El Capitan 10.10
Your error message will look like this:
ERROR: "bundle install" was called with arguments ["json-1.8.3"] or this:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
To get around this issue try:
$xcode-select --install
$sudo chown -R (whoami):admin /usr/local
$sudo xcode-select --reset
@oojikoo-gist
oojikoo-gist / rails_eventmachine_error_patch
Created January 6, 2016 03:38
rails: eventmachine error
I'm trying to install middleman but it crashes when trying to install version 1.0.8 of eventemitter.
I'm running OSX 10.11 El Capitan.
I use rbenv and have tried ruby 2.1.7 and 2.2.0
brew link openssl --force did the trick. Thanks!!
@oojikoo-gist
oojikoo-gist / rails_uuid_enabling.md
Created January 7, 2016 07:07
rails: uuid enabling

enabling UUID on rails

$ rails g migration enable_uuid_extension

psql