Skip to content

Instantly share code, notes, and snippets.


takeshy takeshy

View GitHub Profile
okapies /
Last active Mar 14, 2020
翻訳: ”命令型のコールバック、関数型のプロミス: Node が逸した最大の機会” by James Coglan

命令型のコールバック、関数型のプロミス: Node が逸した最大の機会

Original: "Callbacks are imperative, promises are functional: Node's biggest missed opportunity" by James Coglan

Translated by Yuta Okamoto (@okapies)


  • 訳者は JavaScript や Node.js に関する専門知識がほとんどありません。識者のツッコミをお待ちしております。「◯◯が分からない」等も歓迎です。
  • 元記事から構成を一部変更しています。また、関数型プログラミングに関する記述のうち、議論の骨子に絡まないものは省略しています。
jcsrb / article_image_uploader.rb
Created Dec 22, 2011
CarrierWave extension fix_exif_rotation, strip, quality, resize_to_fill_if_larger
View article_image_uploader.rb
class ArticleImageUploader < ImageUploader
process :fix_exif_rotation
process :strip
process :convert => 'jpg'
process :quality => 85 # Percentage from 0 - 100
version :gallery_thumb do
process :resize_to_fill => Settings.images.article_images.processing.gallery_thumb #44x44
sinisterchipmunk / LICENSE
Last active Sep 26, 2020
tar, gzip, and untar files using ruby in memory without tempfiles
Copyright (C) 2011 by Colin MacKenzie IV
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
tily / dot.mongorc.js
Created Oct 7, 2011
MongoDB DBQuery extension for easier printjson
View dot.mongorc.js
DBQuery.prototype.p = function() {
var args = arguments
this.forEach(function(e) {
var result = {}
if(args.length == 0) {
result = e
} else {
for(var i = 0; i < args.length; i++) {
var target = e
var keys = args[i].split('.')
You can’t perform that action at this time.