Skip to content

Instantly share code, notes, and snippets.

View hujuu's full-sized avatar
🌊
big wave

hujuu hujuu

🌊
big wave
  • Tokyo
  • 18:20 (UTC +09:00)
  • X @hujuu
View GitHub Profile
@shimarin
shimarin / invoice.html
Created September 10, 2013 13:48
HTML請求書
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
var data = {
"種別":"請求",
"番号":"20130930-01",
"担当者":"嶋田 大貴",
"宛先":{
"名称":"株式会社○○ 御中",
@mskeen
mskeen / preview.js.erb
Last active April 25, 2023 09:33
rails: insert a partial via javascript
$('#graph-preview').replaceWith("<%=j render partial: 'preview' %>");
@foostan
foostan / octocat(24*24)
Last active August 29, 2015 13:57
The dots pattern of octocat.
□□□□□□□□□□□□□□□□□□□□□□□□
□□□□□□□□■■■■■■■■□□□□□□□□
□□□□□□■■■■■■■■■■■■□□□□□□
□□□□■■■■■■■■■■■■■■■■□□□□
□□□■■■■■■■■■■■■■■■■■■□□□
□□□■■■■■■■■■■■■■■■■■■□□□
□□■■■■□■■■■■■■■■■□■■■■□□
□□■■■■□□■■■■■■■■□□■■■■□□
□■■■■■□□□□□□□□□□□□■■■■■□
□■■■■□□□□□□□□□□□□□□■■■■□
face suit value
king spades 13
queen spades 12
jack spades 11
ten spades 10
nine spades 9
eight spades 8
seven spades 7
six spades 6
five spades 5
@LarryUllman
LarryUllman / gist:fbe8db2f1ecc6c92e74a
Created July 23, 2014 14:49
Stripe - Calculate Subscription Proration
proration cost = (period end - API request time) / (period end - period start) * quantity * plan price
@kyohei-shimada
kyohei-shimada / capybara_memo.md
Last active February 12, 2023 23:49
Capybaraを使う上で気をつけること

Capybaraを使う上で気をつけること

アンチパターンとか,ハマりどころとか

expect(page).to have_content 'hogheoge'

expect(page).to have_content 'hogehoge'
@mignonstyle
mignonstyle / markdown-cheatsheet.md
Last active June 14, 2024 04:30
Markdown記法 チートシート

Block Elements ## Headers 見出し 先頭に#をレベルの数だけ記述します。 ```

見出し1

見出し2

見出し3

見出し4

見出し5
見出し6
## 見出し2
### 見出し3
#### 見出し4
##### 見出し5
###### 見出し6 ## Block 段落 空白行を挟むことで段落となります。 ```
段落1
(空行)
段落2
``` 段落1 段落2 ## Br 改行 改行の前に半角スペース` `を2つ記述します。 ```
hoge
fuga(スペース2つ)
piyo
``` hoge
fuga piyo ## Blockquotes 引用 先頭に`&gt;`を記述します。ネストは`&gt;`を多重に記述します。 ```
&gt; 引用 &gt; 引用
&gt;&gt; 多重引用
``` &gt; 引用 &gt; 引用
&gt;&gt; 多重引用 ## Code コード `` `バッククオート` `` 3つ、あるいはダッシュ`~`3つで囲みます。 ```
print 'hoge'
``` ```
print 'hoge'
``` ### インラインコード `` `バッククオート` `` で単語を囲むとインラインコードになります。 ```
これは `インラインコード`です。
``` これは `インラインコード`です。 ## pre 整形済みテキスト 半角スペース4個もしくはタブで、コードブロックをpre表示できます ``` class Hoge def hoge print 'hoge' end end
``` class Hoge def hoge print 'hoge' end end ## Hr 水平線 アンダースコア`_` 、アスタリスク`*`、ハイフン`-`などを3つ以上連続して記述します。 ```
hoge
***
hoge
___
hoge
---
``` hoge
***
hoge
___
hoge
--- # Lists ## Ul 箇条書きリスト ハイフン`-`、プラス`+`、アスタリスク`*`のいずれかを先頭に記
@nevrending
nevrending / pyjwt.md
Last active January 25, 2023 11:54
JWT Authentication in Python

Notice

Originally did this research during my work for Bitwyre. I'm now open-sourcing this and hope this helps anyone who finds it, please let me know by commenting if this did help you!

JWT on Python

The access_token produced by Auth Server (a token grant OAuth2.0) is actually a JWT token itself, but is using a different length and algorithm than your typical JWT.

It is using RS256 rather that the common HS256 algo.

function long_press(el,nf,lf,sec){
let longclick = false;
let longtap = false;
let touch = false;
let timer;
el.addEventListener('touchstart',()=>{
touch = true;
longtap = false;
timer = setTimeout(() => {
longtap = true;
select
TABLE_CATALOG AS DB_NAME,
TABLE_SCHEMA AS SCHEMA_NAME,
TABLE_NAME AS TABLE_NAME,
COLUMN_NAME AS COLUMN_NAME,
COLUMN_DEFAULT AS DEFAULT_VALUE,
IS_NULLABLE AS IS_NULLABLE,
CASE WHEN DATA_TYPE in (
'VARCHAR', 'CHAR', ' CHARACTER', 'STRING',
'TEXT'