Skip to content

Instantly share code, notes, and snippets.

View pluser's full-sized avatar

ESASHIKA Kaoru pluser

View GitHub Profile
@pluser
pluser / init.php
Created September 9, 2014 18:14
The plugin to retrieve full contents via Readability for Tiny Tiny RSS
<?php
class Af_Fullfeed extends Plugin {
private $host;
function about() {
return array(1.0,
"Readability makes us clean page.",
"pluser",
false);
}
function init($host) {
### Keybase proof
I hereby claim:
* I am pluser on github.
* I am pluser (https://keybase.io/pluser) on keybase.
* I have a public key whose fingerprint is E5CF 7C0D 8CAC 66FD FFD3 8E03 8898 810A B058 7EA0
To claim this, I am signing this object:
@pluser
pluser / orgmode.py
Last active August 29, 2015 14:27
Improvement of org-mode plugin in static blog generator Nikola.
import re
import nikola.utils
logger = nikola.utils.get_logger('plugin.orgmode', nikola.utils.STDERR_HANDLER)
def __init__(self):
self.compile_html = self.compile_html_batch_mode
### compile regexp ###
for attrmarker in self.attrmarkers:
for index, regexp in enumerate(attrmarker['regexps']):
@pluser
pluser / arcfuse.py
Last active October 5, 2015 06:25
A Fuse mount script whitch provide readability to huge number of zip files.
#!/usr/bin/env python
# The MIT License (MIT)
#
# Copyright (c) 2015 Kaoru Esashika
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=6
inherit dotnet
if [[ ${PV} == "9999" ]]; then
inherit git-r3
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
inherit java-pkg-2
DESCRIPTION="A DLNA-compliant UPnP Media Server"
HOMEPAGE="http://www.universalmediaserver.com/"
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="6"
inherit webapp versionator
DESCRIPTION="self hostable application for saving web pages"
HOMEPAGE="https://www.wallabag.org"
@pluser
pluser / fix-correct-interface-if-relay-mode.patch
Last active September 15, 2017 06:23
dnsmasq has a bug that it sends DHCPOffer packet via wrong interface if it is dhcp relay mode
--- a/src/dhcp.c 2017-05-23 06:58:46.000000000 +0900
+++ b/src/dhcp.c 2017-09-15 14:31:43.586293892 +0900
@@ -399,7 +399,7 @@
msg.msg_controllen = sizeof(control_u);
cmptr = CMSG_FIRSTHDR(&msg);
pkt = (struct in_pktinfo *)CMSG_DATA(cmptr);
- pkt->ipi_ifindex = rcvd_iface_index;
+ pkt->ipi_ifindex = is_relay_reply ? iface_index : rcvd_iface_index;
pkt->ipi_spec_dst.s_addr = 0;
msg.msg_controllen = cmptr->cmsg_len = CMSG_LEN(sizeof(struct in_pktinfo));
@pluser
pluser / tw_dump_followers.py
Created January 3, 2018 10:04
Dump my own followers
#!/usr/bin/python3
import os
import tweepy
CONSUMER_KEY=os.getenv('TW_CONSUMER_KEY')
CONSUMER_SECRET=os.getenv('TW_CONSUMER_SECRET')
ACCESS_TOKEN=os.getenv('TW_ACCESS_TOKEN')
ACCESS_TOKEN_SECRET=os.getenv('TW_ACCESS_TOKEN_SECRET')
@pluser
pluser / register-ip-coreserver.service
Created June 22, 2019 04:27
Periodically renew ip restriction for coreserver
[Unit]
Description=Register myown IP Address to coreserver
After=network.target
Requires=network.target
[Service]
Type=oneshot
ExecStart=/root/register-login-ip-coreserver.sh