Skip to content

Instantly share code, notes, and snippets.

View morisono's full-sized avatar

morisono

View GitHub Profile
@matsubo
matsubo / credit_card_bin_codes.md
Last active March 26, 2025 08:20
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)が判るようになっている。

@kjunichi
kjunichi / gist_get_by_jsonp.md
Last active March 14, 2023 14:21
JSONPでGitHubのGistが取得できることを知り、XPathでHTMLやJavaScriptを取り出せたのだが。。

背景

Gist外部埋め込みHTMLをJSONPで受け取るにてGistをJSONPで 取得できることを知った。

JSONPで取得できるJSONは微妙

JSONPで取得したJSONはサイトに貼り付けるには便利なのだが、コードとして取り出すにはちょっと面倒

@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active April 19, 2025 04:59
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
@staltz
staltz / introrx.md
Last active April 19, 2025 05:15
The introduction to Reactive Programming you've been missing
@LeCoupa
LeCoupa / nodejs-cheatsheet.js
Last active February 27, 2025 20:09
Complete Node.js CheatSheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
/* *******************************************************************************************
* THE UPDATED VERSION IS AVAILABLE AT
* https://github.com/LeCoupa/awesome-cheatsheets
* ******************************************************************************************* */
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@Tosainu
Tosainu / cute_AA.txt
Last active April 9, 2025 13:04
顔文字詰め合わせ
あせ (・_・;) 顔文字
あせ (・∀・;) 顔文字
あせ (^ω^;;) 顔文字
あせ (゚∀゚ ;) 顔文字
あせ (゚∀゚ ;)タラー 顔文字
あたふた ヽ(´・ω・`ヽ) 顔文字
あつい (。>﹏<) 顔文字
あつい (。>﹏<)あㄘ”ゅい 顔文字
あつい (>﹏<。Ξ。>﹏<) 顔文字
あつい ι(´Д`υ) 顔文字

ImageMagick and FFMPEG commands

Remember that the order of parameters/options is very important.

convert images and save to another dir
convert *.png -set filename:original %t 'export/%[filename:original].jpg'
resize, change dpi and quality
@Kartones
Kartones / postgres-cheatsheet.md
Last active April 21, 2025 03:52
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@larrybotha
larrybotha / A.markdown
Last active April 8, 2025 07:31
Export multiple artboards in Adobe Illustrator to png, or pdf

Export multiple Adobe Illustrator artboards to png, jpg, pdf

This is a reference to Matthew Ericson's article Export Illustrator Layers and/or Artboards as PNGs and PDFs in case something happens to happen to the article, and if I just forget where to find the exporter online.

Usage

  • Drop MultiExporter.js into /Applications/Adobe\ Illustrator\ CS6/Presets.localized/en_GB/Scripts
  • Restart Illustrator
Width Height Standard Divisible by 8
128 72 Yes
256 144 Yes
384 216 Yes
512 288 Yes
640 360 Yes
768 432 Yes
896 504 Yes
1024 576 Yes