Skip to content

Instantly share code, notes, and snippets.

'
'
'-----------------------------------------------------------------
'  手動で選択した範囲をボタンが設置されている列をKeyとして
' 並び替えを実施。ボタン名がASCならば昇順、DESCなら降順で並び替え
'-----------------------------------------------------------------
Sub ボタンの位置で並べ替え_Click()
Dim wCurrCell As String
Dim wBtn As String
Private Sub CommandButton1_Click()
If TextBox1.Text = "" Then Exit Sub
TextBox2.Value = SpellNumber(TextBox1.Value)
End Sub
Private Sub CommandButton2_Click()
TextBox1.Value = ""
TextBox2.Value = ""
End Sub
@aoshiman
aoshiman / beicho.js
Created September 21, 2017 08:40
米朝を桂米朝に置換するブックマークレット
javascript:void(document.body.innerHTML=document.body.innerHTML.replace(/米朝/gi,'桂米朝'))
@aoshiman
aoshiman / SpellNumber.bas
Last active September 13, 2017 09:09
数値を英単語に変換するVBAスクリプト e.g. JPY 123,456,789 -> ONE HUNDRED TWENTY THREE MILLION FOUR HUNDRED FIFTY SIX THOUSAND SEVEN HUNDRED EIGHTY NINE
Option Explicit
'Main Function
Function SpellNumber(ByVal MyNumber)
Dim Dollars, Temp
Dim Count
ReDim Place(9) As String
Place(2) = " THOUSAND "
Place(3) = " MILLION "
Place(4) = " BILLION "
Place(5) = " TRILLION "
(flasklog) aoshiman ~/dev/flasklog/flasklog(*'-') <la
total 888
drwxr-xr-x 12 aoshiman staff 408 5 7 13:14 .
drwxr-xr-x 11 aoshiman staff 374 3 26 17:22 ..
-rw-r--r-- 1 aoshiman staff 1040 2 3 20:47 __init__.py
drwxr-xr-x 5 aoshiman staff 170 3 26 14:02 __pycache__
drwxr-xr-x 15 aoshiman staff 510 3 26 10:02 build
-rw-r--r-- 1 aoshiman staff 974 2 3 20:47 database.py
-rw-r--r-- 1 aoshiman staff 440320 5 7 13:14 flasklog.db
-rw-r--r-- 1 aoshiman staff 2469 3 26 13:34 models.py
def get_allfriends(root_name): #get all friends
friends, cnt = [], 1
while not len(friends) % 100:
friends += api.GetFriends(root_name, page=cnt)
cnt += 1
return friends
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@aoshiman
aoshiman / _lamvery
Last active October 30, 2016 12:29
#compdef lamvery
__lamvery_commands () {
local -a _c
_c=(
'init:Generate initial configuration file'
'build:Build and archive your code and libraries to <your-function-name>.zip'
'set-alias:Set alias to a version of the function'
'configure:Update the remote configuration'
'deploy:Deploy your code and libraries,Update the remote configuration, Set alias (optional)'
@aoshiman
aoshiman / 行「もしかして」列「わたしたち」「入れ替わってるー!?」
Created October 16, 2016 04:13
行「もしかして」列「わたしたち」「入れ替わってるー!?」
In [4]: '行「もしかして」列「わたしたち」「入れ替わってるー!?」'
In [5]: pokemon = [['ピカチュウ', 'ポッポ', 'ヒトカゲ'],
...: ['でんき', 'ひこう', 'ほのお'],
...: ['でんきショック', 'たいあたり', 'ニトロチャージ']]
In [6]: for x in zip(*pokemon):
...: print(x)
...:
('ピカチュウ', 'でんき', 'でんきショック')
@aoshiman
aoshiman / EmbedCodeConverter.js
Last active September 7, 2016 04:19
Embed Code Convert Bookmarklet for Flickr
javascript:(function(){var e,text,textA,textB,textC; e=document.getElementsByClassName('embed-code-text-field');text=e[0].value;textA=text.replace("data-flickr-embed=\"true\"%20%20",'');textB=textA.replace("\<script%20async%20src=\"\/\/embedr.flickr.com\/assets\/client-code.js\"%20charset=\"utf-8\"\>\<\/script\>",'');textC=textB.replace("\>\<\/a\>","%20class=\"img-responsive\"\>\<\/a\>");e[0].value=textC;console.log(textC);})();