Skip to content

Instantly share code, notes, and snippets.

Takuro Monji monzou

Block or report user

Report or block monzou

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tejacques
tejacques / HOCBaseRender.tsx
Last active Oct 16, 2019
React Higher Order Components in TypeScript
View HOCBaseRender.tsx
import * as React from 'react';
import { Component } from 'react';
export default function HOCBaseRender<Props, State, ComponentState>(
Comp: new() => Component<Props & State, ComponentState>) {
return class HOCBase extends Component<Props, State> {
render() {
return <Comp {...this.props} {...this.state}/>;
}
}
@kozo002
kozo002 / jquery.event-mapping.coffee
Last active Aug 29, 2015
Backbone.js like event mapping
View jquery.event-mapping.coffee
jQuery.eventMapping = (object) ->
jQuery.each object.events, (event_and_selector, handler_name) ->
[event, selector_with_elem_name] = event_and_selector.split(' ')
[selector, elem_name] = selector_with_elem_name.split('|')
object.$el.on(event, selector, jQuery.proxy(object[handler_name], object))
if elem_name? then object[elem_name] = object.$el.find(selector)
@gakuzzzz
gakuzzzz / gist:8d497609012863b3ea50
Last active Jan 16, 2019
Scalaz勉強会 主要な型クラスの紹介
View gist:8d497609012863b3ea50
@kjaquier
kjaquier / BitSet.java
Last active Aug 29, 2015
Enum based and memory efficient flag set.
View BitSet.java
public class BitSet<T extends Enum<?>> {
private byte[] bytes;
@SafeVarargs
public BitSet(T... elements) {
bytes = new byte[elements.length / 8 + 1];
}
private int bitMask(int ordinal) {
View slide.md

いかにして我々はフロントエンドに秩序をもたらそうとしてきたか

@mizchi / Quipper

最初に

  • 人間性捧げすぎて資料作るの忘れてました

@aseemk
aseemk / coffeescript-updates.md
Last active Dec 2, 2017
CoffeeScript upcoming changes.
View coffeescript-updates.md

CoffeeScript 1.7 is shaping up to be a pretty kick-ass release with significant improvements. Here are the ones I'm most excited about, in order of my own excitement.

Parentheses-free chaining

https://github.com/jashkenas/coffee-script/pull/3263

Years of being wished for, finally granted!

@nobuoka
nobuoka / JavaAptPlugin.groovy
Last active Sep 28, 2017
Java Annotation Processing Task for Gradle
View JavaAptPlugin.groovy
// buildSrc/src/main/groovy/JavaAptPlugin.groovy
class JavaAPT extends DefaultTask {
private File _destinationDir
def getDestinationDir(dir) { _destinationDir }
void setDestinationDir(dir) {
_destinationDir = dir
outputs.dir _destinationDir
}
@p-j
p-j / Gruntfile.js
Created Aug 26, 2013
Gruntfile.js inspired by Yeoman's webapp generated Gruntfiles, with BlessCSS and Assemble, Htmlmin configured to run smoothly with Usemin and Coffee/Mocha stuff commented out.
View Gruntfile.js
// Generated on 2013-07-30 using generator-webapp 0.2.6
'use strict';
var LIVERELOAD_PORT = 35729;
var lrSnippet = require('connect-livereload')({port: LIVERELOAD_PORT});
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};
// # Globbing
// for performance reasons we're only matching one level down:
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active Oct 14, 2019
A badass list of frontend development resources I collected over time.
View frontendDevlopmentBookmarks.md
@mochiz
mochiz / gist:4736183
Last active Mar 19, 2019
rbenvとruby-buildでRuby環境を最新に保つ
View gist:4736183

rbenvとruby-buildでRuby環境を最新に保つ

更新日:2014/11/19

rbenv, ruby-buildを更新

$ cd ~/.rbenv
$ git pull origin master
$ cd ~/.rbenv/plugins/ruby-build
$ git pull origin master
You can’t perform that action at this time.