Skip to content

Instantly share code, notes, and snippets.

hackable / expressjs-base64-image.js
Created Oct 18, 2011
Node.js base64 encode a downloaded image for use in data URI
View expressjs-base64-image.js
express = require("express")
request = require("request")
BufferList = require("bufferlist").BufferList
app = express.createServer(express.logger(), express.bodyParser())
app.get "/", (req, res) ->
if req.param("url")
url = unescape(req.param("url"))
uri: url
encoding: 'binary'
anekos / read-code-of-commands-or-mappings.vim
Created Mar 9, 2012
Vimperator でコマンドやマッピングのコードを見てみる。
View read-code-of-commands-or-mappings.vim
" コマンド
:echo commands.get('コマンド名').action
" マッピング
:echo mappings.get(modes.NORMAL, '<C-n>').action
request = require('request')
cheerio = require('cheerio')
iconv = require('iconv-jp')
module.exports = (robot) ->
robot.hear /http(s?):\/\/(.*)/i, (msg) ->
url = msg.match[0]
unless url.match(/\.(png|jpg|jpeg|gif|txt|zip|tar\.bz|js|css)/) # filter out some common files from trying
teramako / httpstatus.js
Last active Dec 14, 2015
[Vimperator]httpstatus コマンドで、HTTP のステータスコードをすばやくしらべる! 一般的な Web Programmer ならば、HTTP Status code はすべて暗記していると聞きました。 しかし、僕はWeb Programmerではないので、なかなか覚えきれていないので、HTTPのステータスコードをさがすのに便利なツールを用意しました。
View httpstatus.js
* @see
* @see
* @see
* @see
* @see
* @see
* @see
* @see
* @see
teramako / page-nav.js
Last active Dec 18, 2015 — forked from anonymous/page-nav.js
View page-nav.js
"use strict";
* :nav コマンドでテキトウに補完を使いましょう
* :nnoremap v :nav<Space> とかすると快適かも
var selector = "h1, h2, h3, h4, main, [role=main], [role=navigation], [role=search]";
var cache = new WeakMap;
function getJumpList (force) {
aseemk /
Last active Dec 2, 2017
CoffeeScript upcoming changes.

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

Years of being wished for, finally granted!

azu / .tigrc
Created Jan 28, 2014
tig + git browse-remote
View .tigrc
bind main o !@git browse-remote %(commit)
bind diff o !@git browse-remote %(commit)
bind log o !@git browse-remote %(commit)
anekos / kindle-cloud-reader.js
Last active Mar 8, 2020
Kindle Cloud Reader Key Mapper for Vimperator
View kindle-cloud-reader.js
Copyright (c) 2014, anekos.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
minazou67 /
Last active Sep 21, 2020
How to use the testing distribution of Debian

How to use the testing distribution of Debian

Debian のテスト版 (testing) のディストリビューションを使用する方法です。


  • Debian wheezy

Why use

mizchi / webpack.config.js
Last active Dec 6, 2019
minimum webpack with babel
View webpack.config.js
yarn init -y
yarn add webpack webpack-cli webpack-serve html-webpack-plugin -D
yarn add babel-loader@^8.0.0-beta @babel/core @babel/preset-env -D
echo '{ "presets": ["@babel/preset-env"] }' > .babelrc
const HtmlPlugin = require("html-webpack-plugin");
module.exports = {
mode: process.env.NODE_ENV || "development",