Skip to content

Instantly share code, notes, and snippets.

View linjunpop's full-sized avatar
🐚
Sleeping

Jun Lin linjunpop

🐚
Sleeping
View GitHub Profile
@linjunpop
linjunpop / README.md
Created October 29, 2012 06:34
Git basic

Git basic

Commit

Pricinple

  • One commit one small feature or bug fix
  • Include unit test in one commit
  • Exclude non-associated files
  • Don't commit un-finished or wrong code
@linjunpop
linjunpop / fetcher.ex
Created December 25, 2018 15:17
Building A continues data processing system
defmodule Archiver.Fetcher do
use GenStage
def start_link(args) do
GenStage.start_link(__MODULE__, args, name: __MODULE__)
end
def init(state), do: {:producer, state}
def handle_demand(demand, state) do
@linjunpop
linjunpop / Objective-C-for-Rubyist.md
Last active November 28, 2018 12:18
Objective-C for Rubyist.

Objective-C for Rubyist

Basic Syntax

Message

[you say:@"Hello."];
@linjunpop
linjunpop / install-pandoc.md
Last active July 15, 2018 13:30
Install pandoc

Install pandoc on Mac OS X 10.8

Install

Install haskell-platform

$ brew install haskell-platform
@linjunpop
linjunpop / otp_build_21.0.log_1
Last active June 19, 2018 23:34
asdf install erlang 21.0 log
=== running autoconf in lib
=== running autoconf in lib/common_test
=== running autoconf in lib/erl_interface
=== running autoheader in lib/erl_interface
=== running autoconf in lib/megaco
@linjunpop
linjunpop / keybase.md
Created September 30, 2016 03:52
keybase.md

Keybase proof

I hereby claim:

  • I am linjunpop on github.
  • I am linjunpop (https://keybase.io/linjunpop) on keybase.
  • I have a public key ASBgsLXQTvVJBDcDHjRy6_zR49fhb-UOQ176oCPzQEK3nAo

To claim this, I am signing this object:

@linjunpop
linjunpop / nodes.xquery
Created November 14, 2012 03:29
XQuery taste
(: return a deep copy of the element and all sub elements :)
declare function local:copy($elements as element()+) as element()+ {
for $element in $elements
return element {node-name($element)}
{$element/@*,
for $child in $element/node()
return
if ($child instance of element())
then local:copy($child)
else $child
@linjunpop
linjunpop / message.rb
Last active June 23, 2016 04:33
Sidekiq + Grocer
class Message
include Mongoid::Document
include Mongoid::Timestamps
field :alert, type: String
field :badge, type: Integer, default: 0
field :sound, type: String
field :schedule, type: DateTime
field :custom, type: Hash
@linjunpop
linjunpop / README.md
Last active December 23, 2015 15:49
iOS 7 Safari Notes

CSS font values

-apple-system-headline1
-apple-system-headline2
-apple-system-body
-apple-system-subheadline1
-apple-system-subheadline2
-apple-system-footnote
-apple-system-caption1
@linjunpop
linjunpop / metadata.xml
Last active December 19, 2015 22:38
iTunes Connect App metadata
<?xml version="1.0" encoding="UTF-8"?>
<package xmlns="http://apple.com/itunes/importer" version="software5.1">
<team_id>TEAM-ID</team_id>
<software>
<vendor_id>VENDOR-ID</vendor_id>
<software_metadata>
<versions>
<version string="1.1.3">
<locales>
<locale name="en-US">