Skip to content

Instantly share code, notes, and snippets.

View nalulabo's full-sized avatar

nalulabo nalulabo

View GitHub Profile
dim voices[] = ""
recostate(true)
voice = dictate()
repeat
resize(voices, length(voices))
voices[length(voices) -1] = voice
voice = dictate()
until voice = "終わり"
dim f = fopen("voice.txt", f_write)
fput(f, trim(join(voices,"<#cr>")))
@nalulabo
nalulabo / 20160422.pptm.vb
Last active April 22, 2016 08:18
[note.mu向け]マクロのある暮らし(20回目) - 特定のキーワードをハイライトする
Option Explicit
Sub powerpo()
Dim s As Slide
Dim sh As Shape
Dim tr As TextRange
Dim fr As TextRange
Set s = Presentations(1).Slides(1)
For Each sh In s.Shapes
Sub note_mu()
Dim a As New ADOX.Catalog
Dim mdb As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim fi As Variant
Dim constr As String
Dim dbpath As String
Dim row() As String
'' データベース接続用
@nalulabo
nalulabo / application_wait.vb
Created April 13, 2016 04:38
[note.mu向け]マクロのある暮らし(15回目) - 図形でアニメーションしよう
Option Explicit
Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Sub Macro1()
Dim moon As Shape
Set moon = ActiveSheet.Shapes.AddShape(msoShapeMoon, 162, 55, 145.5, 135)
With moon
.ShapeStyle = msoShapeStylePreset61
.Adjustments.Item(1) = 0.13918
@nalulabo
nalulabo / note_mu.vb
Created April 12, 2016 05:45
[note.mu向け]マクロのある暮らし14回目 - 毎回同じ範囲で同じ場所に同じピボットテーブルとグラフを入れる
Sub note_mu()
Const tablerange As String = "A1:C16"
Const pivotrange As String = "E1"
Dim cache, piv As PivotTable
Dim field As PivotField
Dim pivchart, delchart As Shape
For Each cache In Sheet1.PivotTables
If Format(Now, "ピボットyyyymmdd") = cache.Name Then
For Each delchart In Sheet1.Shapes
@nalulabo
nalulabo / nalulabo_sonic_pi.rb
Created April 1, 2016 07:07
なるーらぼ入門講座「音楽をプログラミングしよう」第8回 - ライブループしよう
# Welcome to Sonic Pi v2.9
use_bpm 132
live_loop :nalulabo do
with_fx :echo, mix: 0.8 do
use_synth :prophet
cue :tick
play chord(:e4, :minor).choose, attack: 0,release: 0.2, cutoff: rrand(80, 100)
sleep 0.75
play chord(:e4, :minor).choose, attack: 0,release: 0.1, cutoff: rrand(80, 100)
sleep 0.75