Skip to content

Instantly share code, notes, and snippets.

View stleamist's full-sized avatar

Dongkyu Kim (Max.kim) stleamist

View GitHub Profile
@jasonrudolph
jasonrudolph / 00-about-search-api-examples.md
Last active April 30, 2024 19:21
5 entertaining things you can find with the GitHub Search API
@loai-kanou
loai-kanou / dabblet.css
Created August 5, 2013 03:49 — forked from LeaVerou/dabblet.css
Draw SVG in canvas
/**
* Draw SVG in canvas
*/
@raphaelschaad
raphaelschaad / RSTimingFunction.h
Last active June 10, 2024 11:47
All the cool animation curves from `CAMediaTimingFunction` but not limited to use with CoreAnimation. See what you can do with cubic Bezier curves here: http://netcetera.org/camtf-playground.html To get started just "Download Gist", throw the .h and .m files into your Xcode project and you're good to go!
//
// RSTimingFunction.h
//
// Created by Raphael Schaad on 2013-09-28.
// This is free and unencumbered software released into the public domain.
//
#import <UIKit/UIKit.h>
@rxaviers
rxaviers / gist:7360908
Last active July 5, 2024 17:44
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@alkaruno
alkaruno / Base64.js
Created September 9, 2014 14:36
Base64 encode & decode (only for numbers) in JavaScript
var Base64 = (function () {
var ALPHA = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
var Base64 = function () {};
var _encode = function (value) {
if (typeof(value) !== 'number') {
throw 'Value is not number!';
@jamesktan
jamesktan / Shell Commands ePub
Last active April 18, 2024 12:28
Unzipping & Zipping ePub from Command Line
// To unzip the epub, move the ePub to a folder, cd to it then simply:
unzip MyEbook.epub
// To zip up an epub:
1. zip -X MyNewEbook.epub mimetype
2. zip -rg MyNewEbook.epub META-INF -x \*.DS_Store
3. zip -rg MyNewEbook.epub OEBPS -x \*.DS_Store
Some explanations necessary here. We start each line with two flags:
@cobalamin
cobalamin / gtgteq.swift
Last active March 15, 2021 14:07
>>=, the "monad" bind operator, in Swift
infix operator >>= {
associativity left
precedence 160
}
func >>=<S: SequenceType, T>(source: S, transform: S.Generator.Element -> [T]) -> [T] {
return flatMap(source, transform)
}
func >>=<C : CollectionType, T>(source: C, transform: (C.Generator.Element) -> [T]) -> [T] {
return flatMap(source, transform)
@belohlavek
belohlavek / binaryUtil.js
Last active January 3, 2023 16:37
ASCII to Binary and Binary to ASCII Utility functions in Javascript.
var Util = {
toBinary: function(input) {
var result = "";
for (var i = 0; i < input.length; i++) {
var bin = input[i].charCodeAt().toString(2);
result += Array(8 - bin.length + 1).join("0") + bin;
}
return result;
},
@Senarin
Senarin / lib.lunarcal.public.js
Last active December 21, 2023 17:10
An standalone JavaScript library file for Korean lunar calendar calculation :3
/**************************************************
* 양음력 계산 라이브러리 -- Library file for Korean Lunar Calendar
* by Senarin
**************************************************/
var DAY0000=1721424.5; // 0000/12/31
var SOLAR_EPOCH=1721425.5; // 0001/1/1
var YEAR_MIN=1583; // Min. Year
var YEAR_MAX=2100; // Max. Year
var LUNAR_EPOCH=2299261.5;
var LOWER_LIMIT=LUNAR_EPOCH;
@christopherweems
christopherweems / UIViewAnimationCurve+ToOptions.swift
Created December 8, 2015 15:08
Convert from UIViewAnimationCurve to UIViewAnimationCurveOptions
// Simple function converting from UIViewAnimationCurve to UIViewAnimationCurveOptions
// Not all UIViewAnimationCurve values have a specified equivalent UIViewAnimationCurveOptions,
// making it tricky to use the animation curve of the keyboard with UIView.animateWithDuration(...) API.
// This works as late as iOS 9.1, but could change in the future.
extension UIViewAnimationCurve {
func toOptions() -> UIViewAnimationOptions {
return UIViewAnimationOptions(rawValue: UInt(rawValue << 16))
}
}