Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Yutaka Matsubara mopemope

🏠
Working from home
View GitHub Profile
@mopemope
mopemope / xvideos.py
Created Oct 4, 2011
xvideos downloader
View xvideos.py
import os
from os import path
from werkzeug import secure_filename
from tobikko.core import *
from tobikko.patch import *
patch_all()
import urllib2
from pyquery import PyQuery as pq
import urllib
from urlparse import urlparse
@mopemope
mopemope / config.fish
Last active Aug 15, 2020
config.fish
View config.fish
# Path to Oh My Fish install.
set -gx OMF_PATH /home/ma2/.local/share/omf
# Customize Oh My Fish configuration path.
#set -gx OMF_CONFIG /home/ma2/.config/omf
set fish_plugins pbcopy
set fish_greeting ""
set -x LC_CTYPE ja_JP.UTF-8
View async_dns.c
#include <ares.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <netdb.h>
#include <stdarg.h>
#include <string.h>
#include <ctype.h>
@mopemope
mopemope / lfe.md
Created May 21, 2015
LFE入門の進捗
View lfe.md

LFE 入門

近年、ネットワークアプリケーションを書くにあたり Erlang/OTP に対する注目が集まっています。 大規模サービスで使わているなどの事例が多く紹介されるようになり、導入を考えている方も多いでしょう。 ですが、Erlang は少々癖があり、難しく感じる方も少なくありません。 今回はそのような人向けに LFE を紹介しようと思います。

LFE とは

LFE とは (lisp (flavored (erlang))) の略です。その名の通り、 Erlang Virtual Machine (BEAM) 上で動く Lisp です。

@mopemope
mopemope / gist:933755
Created Apr 21, 2011
bjoern and meinheld hello_world benchmark
View gist:933755
ab -c 100 -n 10000 http://192.168.2.11:8000/
bjoern 1.1.1
This is ApacheBench, Version 2.0.41-dev <$Revision: 1.141 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 2006 The Apache Software Foundation, http://www.apache.org/
Benchmarking 192.168.2.11 (be patient)
Completed 1000 requests
@mopemope
mopemope / log
Created May 13, 2014
run systemd-nspawn docker container
View log
core@coreos-local ~ $ ./nspawn-container jmatis/tomcat7 "/opt/start-watch-tomcat.sh"
Pulling repository jmatis/tomcat7
b3dfa5e5f738: Download complete
511136ea3c5a: Download complete
5e66087f3ffe: Download complete
4d26dd3ebc1c: Download complete
d4010efcfd86: Download complete
99ec81b80c55: Download complete
c17d434dd941: Download complete
180579a76826: Download complete
View xmobarrc
-- -*- mode:haskell -*-
Config { font = "xft:Ricty:size=12"
, bgColor = "#1c1c1c"
, fgColor = "#757575"
, position = TopSize C 100 16
-- , position = Static { xpos = 37 , ypos = 0, width = 1845, height = 18 }
, lowerOnStart = False
, overrideRedirect = False
, border = NoBorder
, borderColor = "#26a69a"
@mopemope
mopemope / dynamicbloom.c
Created Jul 11, 2011
Dynamic Bloom Filter
View dynamicbloom.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <limits.h>
#include <inttypes.h>
#include <math.h>
typedef struct {
@mopemope
mopemope / qgmlwy.typ
Created Feb 5, 2018
Gtypist lessons for the qgmlwy
View qgmlwy.typ
G:MENU
*:lesson_0
B:home row-first finger ngrams drill
T:a drill on word pieces including the letters n, a. (29 found)
D:a a a ana ana ana nann nann nann nana nana nana ann ann ann aan aan
:aan nan nan nan nnan nnan nnan nna nna nna n n n anan anan anan anna
:anna anna nan n anna nann anan a ana aan ann nana nnan nna nana aan
:anan nnan ann a anna n nann nan nna ana nana a ann nnan nann anna n
:nan nna ana aan anan
@mopemope
mopemope / lets_split.json
Created Nov 20, 2017
Let's split setting
View lets_split.json
{"version":1,"keyboard":{"keys":[{"id":0,"legend":"","state":{"x":0.5,"y":1,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"a":7},"row":0,"col":0,"keycodes":[{"id":"RESET","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":1,"legend":"Q","state":{"x":1.5,"y":1,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"a":4},"row":0,"col":1,"keycodes":[{"id":"KC_Q","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fiel
You can’t perform that action at this time.