Skip to content

Instantly share code, notes, and snippets.

View heavymery's full-sized avatar

Shindeok Kang heavymery

View GitHub Profile
@heavymery
heavymery / generate-pushid.js
Created July 1, 2018 03:16 — forked from mikelehen/generate-pushid.js
JavaScript code for generating Firebase Push IDs
/**
* Fancy ID generator that creates 20-character string identifiers with the following properties:
*
* 1. They're based on timestamp so that they sort *after* any existing ids.
* 2. They contain 72-bits of random data after the timestamp so that IDs won't collide with other clients' IDs.
* 3. They sort *lexicographically* (so the timestamp is converted to characters that will sort properly).
* 4. They're monotonically increasing. Even if you generate more than one in the same timestamp, the
* latter ones will sort after the former ones. We do this by using the previous random bits
* but "incrementing" them by 1 (only in the case of a timestamp collision).
*/
@heavymery
heavymery / ios-design-develop-resources.md
Created July 9, 2016 11:50
iOS アプリデザイン・開発リソースまとめ

iOS アプリのデザイン・開発リソースまとめ

iOS アプリ作りに必要なガイドラインやチュートリアル、リファレンス系は全部「アップルの公式リソース」にある!

ほとんど英語だけど・・・大事なページは日本語に訳されている。

ガイドライン系

この辺のガイドラインは iOS アプリに限る話じゃなくて、一般的な UI デザインに必要な知識も網羅されているので必須!

@heavymery
heavymery / design-resources.md
Last active August 4, 2016 04:35
デザインリソースまとめ
@heavymery
heavymery / cross-platform-tools.md
Last active April 18, 2017 15:21
List of my favorite cross-platform tools.

Quick look

Angular, React or ...

  • Angular - One framework. Mobile and desktop.
  • NativeScript - NativeScript 2.0 truly native mobile apps with Angular
  • Ionic - Advanced HTML5 Hybrid Mobile App Framework
  • React - A JavaScript library for building user interfaces
  • React Native - A framework for building native apps using React

WebGL

@heavymery
heavymery / SassMeister-input.scss
Last active February 8, 2019 04:40 — forked from Grsmto/SassMeister-input.scss
BEM SASS mixin (single class)
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.10)
// ----
/*
A slightly more automated approach to BEM modifier classes:
using '&' parent selector interpolation, modifiers extend their bases,
so that HTML markup requires only the modifier class not the base *and* modifier
*/
@heavymery
heavymery / gist:4a6e7a4317dd805ab69a
Created November 26, 2015 10:40 — forked from mmintel/gist:045ffce76b00b327bfc0
BEM mixins in Sass 3.4
$elementSeparator: '__';
$modifierSeparator: '--';
@function containsModifier($selector) {
$selector: selectorToString($selector);
@if str-index($selector, $modifierSeparator) {
@return true;
} @else {
@return false;
}
/// Block Element
/// @access public
/// @param {String} $element - Element's name
@mixin element($element) {
&__#{$element} {
@content;
}
}
/// Block Modifier
var xmpp = require('node-xmpp');
//Set node-xmpp options.
//Replace with your projectID in the jid and your API key in the password
//The key settings for CCS are the last two to force SSL and Plain SASL auth.
var options = {
type: 'client',
jid: '[email protected]',
// jid: '[email protected]',
password: 'xxxx',
@heavymery
heavymery / killer-commands.md
Last active July 6, 2017 08:03
便利コマンドまとめ

ファイル名一括変換

for; do; done と mv コマンドを組み合わせてファイル名を一括で変換する事ができます。

ファイル名の先頭または後尾に文字列追加

for F in {対象ファイルのパス}; do mv $F {先頭に追加したい文字列}$F\{後尾に追加したい文字列}; done;