Skip to content

Instantly share code, notes, and snippets.

View flyingmate's full-sized avatar

Seong Hoon Lee flyingmate

View GitHub Profile
@jforaker
jforaker / A react-native android Facebook login setup.md
Last active December 9, 2018 12:45
react-native android Facebook login
@cmelchior
cmelchior / SerializeToJson.java
Last active September 20, 2022 04:30
Serialize Realm objects to JSON using GSON
// GSON can parse the data.
//
// Deserialization:
// Note there is a bug in GSON 2.3.1 that can cause it to StackOverflow when working with RealmObjects.
// To work around this, use the ExclusionStrategy below or downgrade to 1.7.1
// See more here: https://code.google.com/p/google-gson/issues/detail?id=440
//
// Serialization:
// <Type>RealmProxy objects are created by the Realm annotation processor. They are used to control
// access to the actual data instead of storing them in fields and it is therefore them we need to register a
@jvenator
jvenator / gist:9672772a631c117da151
Last active June 14, 2024 13:31
PDFtk Server Install Workaround for Mac OS X

Installing PDFtk Server edittion on your Mac

This workaround install is necessary because PDFtk was pulled from homebrew-cask due to issues with it aggressively overwriting file permissions that could impact other installed libraries. See this homebrew-cask issue.
The following steps worked on Mac OS X 10.10.1 with a standard brew installation for the PDFtk Mac OS X server libary version 2.02.
All Terminal commands separated by a full line space. Some commands wrap into multiple lines.

Download and extract the Mac OS X server install pacakge

@allieus
allieus / spellchecker.py
Last active August 29, 2015 14:13
네이버 자동 띄어쓰기
#!/usr/bin/env python2
# coding: utf-8
from __future__ import print_function
import sys
import re
import json
import urllib
from colorama import init, Fore, Back, Style
URL = 'http://csearch.naver.com/dcontent/spellchecker.nhn'
@ccschmitz
ccschmitz / spree_tools.rake
Last active October 11, 2016 08:18
A Rake task for creating Spree promo codes in bulk
namespace :spree_tools do
desc "Generate random coupon codes in bulk."
task :generate_coupons => :environment do
puts "How many codes would you like to generate?"
number_of_codes = STDIN.gets.strip.to_i
puts "\nHow much would you like this discount to be for?"
amount = STDIN.gets.strip.to_f
puts "\nWhat product should this promotion apply for? (use product name)"
@jbonney
jbonney / deploy.rb
Created August 17, 2013 15:15
Mina deployment file to setup new host for Rails applications. Creates the folder structure, fill up the database.yml file, create the associated DB and user and set up new Apache virtual host file.
require 'mina/bundler'
require 'mina/rails'
require 'mina/git'
require 'mina/rvm'
# Usually mina focuses on deploying to one host and the deploy options are therefore simple.
# In our case, there is a number of possible servers to deploy to, it is therefore necessary to
# specify the host that we are targeting.
server = ENV['server']
# Since the same host can have multiple applications running in parallel, it is necessary to
@lest
lest / gist:1517325
Created December 24, 2011 13:22
Ruby 1.9.3 with readline and libyaml under rbenv
wget "ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz"
tar xf readline-6.2.tar.gz
cd readline-6.2
./configure --prefix=$HOME/.rbenv/versions/1.9.3-p125
make -j 2
make install
cd ..
wget "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz"
tar xf yaml-0.1.4.tar.gz