Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/perl
# This is GNU software: use is permitted -- and encouraged -- but only under the terms set forth at http://www.gnu.org/licenses/gpl.txt.
# Copyright 2002, 2003, 2006 by Scott Walters, scott@illogics.org, and contributors.
# See http://perldesignpatterns.com/?TinyWiki for more information on TinyWiki, and how to configure and use it.
# use Carp; use CGI::Carp 'fatalsToBrowser'; *Carp::longmess_heavy = *Carp::longmess;
exit if $ENV{HTTP_USER_AGENT} =~ m/Java/; # what the FUCK is it with these Java robots pounding the hell out of the site?
umask 0; my $wiki = qr{[A-Z][a-z]+[A-Z][A-Za-z]+}; my $sn = $ENV{SCRIPT_NAME}; my $rip = $ENV{REMOTE_ADDR};
do {
sub a0 ($); sub a1 ($); sub a2 ($); sub a3($); sub a4($); our $text; our $state; our $typeface;
for my $x (0..4) {
@kamawanu
kamawanu / カード決済業務のすべて_読書メモ.md
Created February 23, 2022 12:46
カード決済業務のすべて_読書メモ

1.決済カード業務の概要と実務

カードビジネスの仕組み

業法、主務官庁

日本における業法の守備範囲は以下の通り

  • 割賦販売法・・・クレジットカード
  • 貸金業法・・・キャッシングやカードローンなどの金融商品

所轄官庁は、クレジットカードが経済産業省、金融商品が金融庁
割賦販売法では以下の通り定義されている

  • クレジットカードを使ったショッピング・・・包括信用購入あっせん
<?php
$SRC = file_get_contents($argv[1]);
$TOKENS = token_get_all($SRC);
function safecrlf(& $str){
$hascrlf = preg_match('/[\r\n]/',$str);
$str = addcslashes($str,"\r\n\t ");
return $hascrlf;
@kamawanu
kamawanu / __opt.py
Last active February 9, 2022 00:23
z80 instruction set implements by python3, experimental, planning,
from z80 import z80, _decode_0
import reg
import inspect
from typing import Optional
def unref(data) -> Optional[str]:
return z80.what(data)
#!/bin/bash -x
BYPATH=$( fgrep $1 /sys/bus/usb/devices/*/serial | cut -d: -f1 )
DEVPATH=$( echo $BYPATH | cut -d/ -f6 | cut -d- -f2 )
##ls -1 /dev/disk/by-path/pci-*
cd /dev/disk/by-path/
realpath $( readlink pci-*:*:*-usb-*:$DEVPATH:* )
1 REM **** HP BASIC PROGRAM LIBRARY ******************************
2 REM
3 REM STTR1: STAR TREK
4 REM
5 REM 36243 REV B -- 10/73
6 REM
7 REM **** CONTRIBUTED PROGRAM ***********************************
100 REM *****************************************************************
110 REM *** ***
120 REM *** STAR TREK: BY MIKE MAYFIELD, CENTERLINE ENGINEERING ***
@kamawanu
kamawanu / index.php
Last active February 9, 2022 00:22
tiny directory browser
<?php
$DIR = explode("/", $_SERVER["PATH_INFO"]);
##if( $_SERVER["SCRIPT_NAME"] != $_SERVER["REQUEST_URI"] ){
## header("Refresh: 0;URL=${_SERVER["SCRIPT_NAME"]}");
## exit;
##}
###var_dump($_SERVER);
#!/usr/bin/perl
#
use strict;
no strict (qw(refs));
use Carp;
#
die "must runs on linux" unless $^O eq "linux";
#
my $testmode=0;
#
#!/bin/bash -xe
for P in $( find /sys/bus/usb/devices/ )
do
if [ \! -f $P/serial ]
then
continue
fi
# if [ $( cat $P/bDeviceClass ) == 09 ]
# then
# continue
@kamawanu
kamawanu / __init__.py
Last active February 9, 2022 00:21
wrap sqlite3 as dict
#! https://gist.github.com/4502712