Skip to content

Instantly share code, notes, and snippets.

@oldergod
oldergod / ruby_inline.sh
Last active August 29, 2015 14:09
Ruby inline with before and after blocks
ls | ruby -ne 'BEGIN{puts("lets go");$array = []};$array << $_.chomp;END{puts $array.inspect;puts "finished"}'
@oldergod
oldergod / dabblet.css
Last active June 29, 2016 09:46
CSS Coding Tips : Minimize code duplication
/**
* CSS Coding Tips : Minimize code duplication
*/
button {
padding: 6px 16px;
border: 1px solid #446d88;
background: #58a linear-gradient(#77a0bb, #58a);
border-radius: 4px;
box-shadow: 8 1px 5px gray;
@oldergod
oldergod / dabblet.css
Last active June 30, 2016 05:00
CSS Coding Tips: Maintainability versus brevity
/**
* CSS Coding Tips: Maintainability versus brevity
*/
div {
position: absolute;
top: calc(50% - 25px);
left: calc(50% - 25px);
height: 50px;
width: 50px;
@oldergod
oldergod / dabblet.css
Created June 30, 2016 05:06
CSS Coding Tips: Inheritance
/**
* CSS Coding Tips: Inheritance
*/
div {
margin-top: 50px;
position: relative;
border: 1px solid black;
background: pink;
}
@oldergod
oldergod / dabblet.css
Created June 30, 2016 05:12
CSS Coding Tips: Trust your eyes
/**
* CSS Coding Tips: Trust your eyes
*/
div {
position: absolute;
top: 100px;
}
span {
@oldergod
oldergod / animation-based-trigger.js
Created June 30, 2016 13:58
Animation based trigger
const el = document.querySelector('.el');
elA.addEventListener('animationend', () => {
elA.classList.remove('.animating');
}):
// triggers CSS animation which time varies
elA.classList.add('.animating');
// How to check that the class `animating` is rightly removed when the animation finishes?
@oldergod
oldergod / AndroidBuildTips.md
Last active August 19, 2016 03:46
IntelliJ Tipsまとめ

Android Building

  • multiDex が必要な時に、 multiDexEnabled true にする事。
    • minSdk が < 21 なら開発用の flavor を minSdk ≧ 21 にする。
  • Gradle Android プラグインを最新にする事。
  • Gradle の heap をあげていく!
    • gradle.properties にて org.gradle.jvmargs=-Xmx4048m -XX:MaxPermSize=512m
  • Instant Run を有効化する。
    • 無駄に AndroidManifest とかを各ビルドに弄らない。
@oldergod
oldergod / DevFest16.tokyo.report.md
Last active October 11, 2016 01:58
DevFest16 東京のレポート

DevFest16 東京

個人的にUKオフィスのグーグラーが来る事が一番ワクワクだったポイントである。

BTW:グーグラーはipassというサービスを使ってインターネットに接続してた。

面白いセッションのピックアップとのまとめ

Living Life on the Edge / Chris Banes

@oldergod
oldergod / keybase.md
Created November 2, 2016 01:16
keybase auth

Keybase proof

I hereby claim:

  • I am oldergod on github.
  • I am oldergod (https://keybase.io/oldergod) on keybase.
  • I have a public key whose fingerprint is 8B6C 86DC 67D8 0CE9 B1C8 2822 AADC 8990 FC32 3E48

To claim this, I am signing this object:

@oldergod
oldergod / LoginContextUnwrappingConverter.java
Last active December 6, 2016 00:44
Retrofit and envelopes
public class LoginContextUnwrappingConverter extends Converter.Factory {
@Override
public Converter<ResponseBody, LoginContext>
responseBodyConverter(Type type,
Annotation[] annotations,
Retrofit retrofit) {
if (type != LoginContext.class) {
return null;
}