Skip to content

Instantly share code, notes, and snippets.

View ngtkt0909's full-sized avatar

T. Ngtk ngtkt0909

  • Japan
View GitHub Profile
@ngtkt0909
ngtkt0909 / kindle_ss.py
Last active January 20, 2024 10:43 — forked from dengax/kindle_ss.py
take screenshots for Kindle for PC
# from dataclass import KindleSSConfig, read_config
# from wxdialog import SimpleDialog, Icon
# from WindowInfo import *
from typing import TypeVar
import dataclasses
import configparser
import os.path as osp
#
# dataclass.py
@ngtkt0909
ngtkt0909 / owp2ogg.py
Last active May 5, 2018 13:08
OWP to OGG Converter
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys, os, struct, glob
from argparse import ArgumentParser
def main(args):
# search files
set_owp = set()
for file_owp in args.files_owp:
#!/usr/bin/perl
use strict;
use warnings;
use autodie;
use Encode qw(encode decode);
use LWP::Simple;
use File::Spec;
use Time::HiRes;
use Term::ReadKey;
#!/usr/bin/perl
#
# 【概要】
# 画像ダウンロードスクリプト
# http://www.bobx.com/dark/lovepop.html
use strict;
use warnings;
use autodie;
use utf8;
import sys
import os
import requests
from time import sleep
from random import random
def download(url, to_path='.'):
print('download: %s ... ' % url, end='')
file_name = os.path.join(to_path, url.split('/')[-1])
if os.path.isfile(file_name) and os.path.getsize(file_name) > 0:
@ngtkt0909
ngtkt0909 / spinlock.md
Created November 23, 2016 12:16
同期制御(spin lock) 備忘録
static spinlock_t spinlock;

spin_lock_init(&spinlock);
spin_lock(&spinlock);
...
spin_unlock(&spinlock);