Skip to content

Instantly share code, notes, and snippets.

View mopemope's full-sized avatar
🏠
Working from home

Yutaka Matsubara mopemope

🏠
Working from home
View GitHub Profile
@mopemope
mopemope / async_dns.c
Created May 26, 2011 08:35
c-ares example
#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 / xhamster.py
Created March 29, 2011 03:41
xhamster video downloader
from os import path
from werkzeug import secure_filename
import eventlet
from eventlet.green import urllib2
from pyquery import PyQuery as pq
from urlparse import urlparse
import psyco
psyco.full()
search_urls = [
@mopemope
mopemope / aide.el
Created March 10, 2023 09:40
Add openai chat to aide.el
;;; aide.el --- An Emacs front end for GPT APIs like OpenAI -*- lexical-binding: t; -*-
;; Copyright (C) 2021 Junji Zhi
;; Author: Junji Zhi
;; Keywords: gpt-3 openai
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
(use-package copilot
:straight (:host github :repo "zerolfx/copilot.el" :files ("dist" "copilot.el"))
:ensure t
:config
(global-unset-key (kbd "TAB"))
(global-set-key (kbd "TAB") (lambda (&optional ARG)
(interactive)
(or (copilot-accept-completion)
(indent-for-tab-command ARG))))
(with-eval-after-load 'company
@mopemope
mopemope / config.fish
Last active June 23, 2022 11:37
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
@mopemope
mopemope / url.txt
Created March 10, 2011 04:32
url list
http://cdn.empflix.com/empdl/d29f2311843c72780ad8-1/Mosaic_Piss_yuka_oosawa.flv?key=8fa0e37f680e62d3579d96c3274079d8
http://cdn.empflix.com/empdl/858c18d5c651050719f0-1/Sexy_Ama_Pounded.flv?key=e741ade50feb139b12c57bffa6763987
http://cdn.empflix.com/empdl/605dfc50baa51b31effd-1/Cute_Asian_BAbe_Fuck.flv?key=f25080803340946f7fb282acc03080cf
http://cdn.empflix.com/empdl/977907b56b9a90093e97-1/Asian_Threesome.flv?key=7fcef68f682b8f7a54a904e76ec6da6e
http://cdn.empflix.com/empdl/1a2aa44ffb151a48bd75-1/Japanese_Slut_mm1072.flv?key=87a1a5a8f353282878a8d44085123c99
http://cdn.empflix.com/empdl/debe86816c0ad3284c5e-1/Japanese_Slut_mm1073.flv?key=c374497de560db995b9bca16736f1c19
http://cdn.empflix.com/empdl/16882324be00e8e2035e-1/Japanese_Slut_mm723.flv?key=b6c2cdb343590ac94d36d4735a98d072
http://cdn.empflix.com/empdl/659cf8e96e0415fdd704-1/Japanese_Slut_mm1096.flv?key=bbc8318ab6a38dabea4280d37fbbf3a6
http://cdn.empflix.com/empdl/74a676be999c39472933-1/Japanese_Slut_m174.flv?key=41b31a254cffeddf68767a4fbfb703d7
http://
@mopemope
mopemope / xvideos.py
Created October 4, 2011 15:01
xvideos downloader
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 / lfe.md
Created May 21, 2015 03:11
LFE入門の進捗

LFE 入門

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

LFE とは

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

@mopemope
mopemope / gist:933755
Created April 21, 2011 05:12
bjoern and meinheld hello_world benchmark
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 08:34
run systemd-nspawn docker container
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