Skip to content

Instantly share code, notes, and snippets.

View ymotongpoo's full-sized avatar
📈
observability matters

Yoshi Yamaguchi ymotongpoo

📈
observability matters
View GitHub Profile
from twisted.web import client
from twisted.internet import reactor, defer
from lxml import etree
from StringIO import StringIO
import re
import os
save_dir = "~/.video/jizzhut/"
base_url = "http://jizzhut.com"
download_re = re.compile('so.addVariable\("content_video",\s*"([\w\d.:/_]*)"\);', re.M)
from twisted.web import client
from twisted.internet import reactor, defer
from lxml import etree
from StringIO import StringIO
import re
import os
save_dir = "~/.video/pornzapp/"
base_url = "http://www.pornzapp.com"
download_re = re.compile('"/js/interface.php\?id=([\w\d.:/_]*)"', re.M)
from twisted.web import client
from twisted.internet import reactor, defer
from lxml import etree
from StringIO import StringIO
import re
import os
save_dir = "~/.video/tube8/"
base_url = "http://www.tube8.com"
download_re = re.compile("so.addVariable\('videoUrl',\s*'([\w\d.:/_]*)'\);", re.M)
esecached
*.6
*.8
;;; 文字コード指定を -*- coding: hoge -*- でもできるように
;;; .xyzzy にでも; 組み込み関数上書き注意報
(defun ed::find-file-auto-encoding (filename)
(unwind-protect
(let ((encoding
(progn
(ignore-errors (insert-file-contents filename t nil 4096))
(goto-char (point-min))
(dolist (x *auto-encoding-alist* nil)
@hemanth
hemanth / factorial.py
Created June 27, 2010 09:08 — forked from ghoseb/factorial.py
factorial.py
#Newbie programmer
def factorial(x):
if x == 0:
return 1
else:
return x * factorial(x - 1)
print factorial(6)
#First year programmer, studied Pascal
-module(mnesia_repl_and_frag).
-compile([export_all]).
-record(store, {key, value}).
%% Usage:
%% Start secondary node, at first. Not a typo :-)
%% Then start primary at another node.
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 / gmail.py
Created February 17, 2011 07:08
use XOAUTH example
import imaplib
import base64
import email
import re
from email import header as _header
#patch
ecre = re.compile(r'''
=\? # literal =?
@mopemope
mopemope / msqueue.c
Created March 8, 2011 02:11
lock free queue example
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include <pthread.h>
#include <sys/time.h>
typedef struct pointer {
struct node *ptr;
uint32_t count;
} pointer_t;