Skip to content

Instantly share code, notes, and snippets.

View Javran's full-sized avatar

Javran Cheng Javran

View GitHub Profile
@tioover
tioover / curry.rkt
Last active January 1, 2016 12:09 — forked from Javran/gist:8142839
#lang racket
(define (curry f)
(define (min-arity arity)
(if (number? arity) arity (arity-at-least-value arity)))
(define (curry-aux f args arity)
(lambda (a)
(let ((new-args (cons a args)))
(cond ((= arity 1)
(apply f (reverse new-args)))
@staltz
staltz / introrx.md
Last active November 14, 2024 11:27
The introduction to Reactive Programming you've been missing
@shouya
shouya / oauth.rb
Last active August 16, 2016 00:29
twitter oauth
#!/usr/bin/env ruby
# license: WTFPL
# Gems:
# $ gem install twitter twitter_oauth
require 'twitter'
require 'twitter_oauth'
# CONSUMER_KEY = '3nVuSoBZnx6U4vzUxf5w'
@mariotaku
mariotaku / .travis.yml
Last active August 8, 2018 13:10
Sign and upload compiled apk to Github releases automatically using Travis CI
language: android
android:
components:
# Uncomment the lines below if you want to
# use the latest revision of Android SDK Tools
- platform-tools
- tools
# The BuildTools version used by your project
- build-tools-22.0.0
@ninegua
ninegua / scrapper.hs
Created April 22, 2015 04:37
Weibo Scrapper (using conduit == 0.2.*) written in 2012
{-# LANGUAGE OverloadedStrings, RankNTypes, ScopedTypeVariables,
NoMonomorphismRestriction, DeriveDataTypeable #-}
module Main where
import Prelude hiding (and, catch)
import Data.Char (toLower)
import Data.Conduit
import Data.Conduit.Util
import Data.Conduit.ImageSize (sinkImageInfo)
import Data.Conduit.Binary (sourceFile, conduitFile, sinkFile)
@scturtle
scturtle / exthoo.hs
Last active November 1, 2015 02:53
Extend hoogle database
#!/usr/bin/env stack
-- stack --resolver global runghc --package turtle
{-# LANGUAGE OverloadedStrings #-}
import Turtle
import qualified Data.Text as T
parser :: Parser Text
parser = argText "pkg" "Package name"
@Javran
Javran / 250x250.png
Last active March 29, 2017 19:15
tmptmp
250x250.png