Skip to content

Instantly share code, notes, and snippets.

View minoritea's full-sized avatar

Minori Tokuda minoritea

View GitHub Profile
@tk0miya
tk0miya / README.md
Last active November 26, 2021 05:41

simple table

| hello | world |
| ----- | ----- |
| hello | world |
| hello | world |

| hello | world |

# 優先順位は変わらないので、優先順位にそってメッソドを再定義する
# メソッドが入れ替わっているので、式内の演算子も置換で入れ替える。
#
# ↑優先順位高
# | ビット or
# & ビット and
# + 加算
# * 乗算
# ↓優先順位低
#
@matsubo
matsubo / credit_card_bin_codes.md
Last active March 8, 2024 04:14
Credit Card Bin Codes

概要

クレジットカード番号には法則があり、先頭6桁でカードの種類を識別、分類することができる。

詳細はISO/IEC 7812で規定されている。

ISO/IEC 7812 - Wikipedia https://ja.wikipedia.org/wiki/ISO/IEC_7812

先頭の6桁を銀行識別番号(Bank Identification Number、略称:BIN)ないしは発行者識別番号(Issuer Identification Number、略称:IIN)と呼び、この先頭6桁でカード発行会社(イシュア、issuer)が判るようになっている。

@kobaatsu
kobaatsu / pref.csv
Last active August 5, 2022 07:22
都道府県一覧 #utils
北海道 HOKKAIDO hokkaido
青森県 AOMORI aomori
岩手県 IWATE iwate
宮城県 MIYAGI miyagi
秋田県 AKITA akita
山形県 YAMAGATA yamagata
福島県 FUKUSHIMA fukushima
茨城県 IBARAKI ibaraki
栃木県 TOCHIGI tochigi
群馬県 GUNMA gunma
@richp10
richp10 / gist:1c367d3c67aec762788e
Created May 10, 2014 10:19
Secure iptables configuration for coreos ??
// This systemd runs iptables-restore on boot:
[Unit]
Description=Packet Filtering Framework
DefaultDependencies=no
After=systemd-sysctl.service
Before=sysinit.target
[Service]
Type=oneshot
ExecStart=/usr/sbin/iptables-restore /opt/docker/scripts/iptables/iptables.rules
@noexpect
noexpect / books_update.py
Last active August 29, 2015 14:00
本日発売のコミックを毎日htmlメールでお知らせ pythonでBeautifulSoupとmailコマンド on Amazon Linux
# -*- coding:utf-8 -*-
import codecs
import sys
reload(sys)
sys.setdefaultencoding('shift_jis')
from BeautifulSoup import BeautifulSoup
import urllib2
import re
class scrape_web:
@ryan5500
ryan5500 / ssh_wifi.rb
Created April 17, 2014 12:16
WAPM-APG300N / WAPM-AG300Nの設定コマンド入力を自動化するスクリプト
#!/usr/bin/env ruby
#
# Buffalo WAPM-APG300N / WAPM-AG300Nの設定を自動化するスクリプト
# sshでルーターに接続し、 コマンドを実行する。
#
require 'net/ssh'
host = ARGV[0] # ホスト名
@subudeepak
subudeepak / angular-loadscript-with-documentwrite.js
Last active May 5, 2020 03:16 — forked from endorama/angular-loadscript.js
Loading scripts on ngInclude (ng route) - Script loading directive
/**
* This module is a variant which supports document.write. If you need document.write use this instead
* Author: Deepak Subramanian @subudeepak(https://github.com/subudeepak)
* Distributed under MIT License
*/
/*global angular */
(function (ng) {
'use strict';
app.directive('script', function() {
return {
@petehunt
petehunt / React sortable
Created December 9, 2013 22:30
Here's an example of React + jQuery UI sortable. The key thing to note is that we have the render() method do absolutely nothing and use componentDidUpdate() + React.renderComponent() to proxy updates through to the children. This lets us manage the DOM manually but still be able to use all the React goodies you know and love.
<html>
<head>
<title>Test</title>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="http://fb.me/react-0.5.1.js"></script>
<script src="http://fb.me/JSXTransformer-0.5.1.js"></script>
</head>
@endorama
endorama / angular-loadscript.js
Last active October 11, 2018 07:28
AngularJS 1.2.0 lazy load script in partials
/*
* Angular LoadScript
*
* Let angular load and execute lazy javascript from partials!
*
* This module is the result of this issue: "1.2.0rc1 regression: script tags not loaded via ngInclude"
* Issue url: https://github.com/angular/angular.js/issues/3756
*
* As of Angular 1.2.0 the ngInclude scripts does not permit execution of javascript from included partials.
* This little module execute code inside script tags with "javascript-lazy" attribute after partial loading,