Skip to content

Instantly share code, notes, and snippets.

David Capello dacap

Block or report user

Report or block dacap

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:50203ded88044bdb540f54602b6327c2
objdump -h skia_draw_text.cpp.o
skia_draw_text.cpp.o: file format Mach-O 64-bit x86-64
Sections:
Idx Name Size Address Type
0 __text 0000042b 0000000000000000 TEXT
1 __gcc_except_tab 0000009c 000000000000042c DATA
2 __literal4 00000008 00000000000004c8 DATA
3 __cstring 00000021 00000000000004d0 DATA
View libskshaper.txt
This file has been truncated, but you can view the full file.
libskshaper.a(libskshaper.SkShaper.o):
U __ZN17SkTextBlobBuilder15allocRunTextPosERK6SkFontii8SkStringPK6SkRect
U __ZN17SkTextBlobBuilder4makeEv
U __ZN17SkTextBlobBuilderD1Ev
00000000000006d0 T __ZN18FontMgrRunIterator7consumeEv
00000000000004e0 T __ZN18FontMgrRunIteratorC2EPKcmRK6SkFont5sk_spI9SkFontMgrE
0000000000000670 T __ZN18FontMgrRunIteratorD0Ev
0000000000000610 T __ZN18FontMgrRunIteratorD1Ev
@dacap
dacap / MoveMask Test.lua
Last active Jul 11, 2019
MoveMask test
View MoveMask Test.lua
local spr = app.activeSprite
spr.selection = Selection(Rectangle(0,0,spr.width,spr.height))
app.command.MoveMask{
target='content',
direction='right',
units='pixel',
quantity=2,
wrap=true
}
@dacap
dacap / Plasma.lua
Created Jul 4, 2019
Plasma Script for Aseprite -- https://www.aseprite.org
View Plasma.lua
-- Copyright (C) 2019 David Capello
local dlg = Dialog("Plasma")
:number{ id="width", label="Size:", text="100", focus=true }
:number{ id="height", text="100" }
:number{ id="frames", label="Frames:", text="100" }
:button{ id="ok", text="OK", focus=true }
:button{ id="cancel", text="Cancel" }
dlg:show()
View Create Sprite With DB32 Palette.lua
local s = Sprite(32, 32, ColorMode.INDEXED)
local p = Palette(32)
local function setc(i,r,g,b) p:setColor(i, Color{r=r, g=g, b=b}) end
setc(0, 0, 0, 0)
setc(1, 34, 32, 52)
setc(2, 69, 40, 60)
setc(3,102, 57, 49)
setc(4,143, 86, 59)
setc(5,223, 113, 38)
setc(6,217, 160, 102)
@dacap
dacap / Touch Toolbar.lua
Created Oct 30, 2018
Example of a custom toolbar of Aseprite v1.2.10-beta2 scripting capabilities
View Touch Toolbar.lua
local dlg = Dialog("Touch Toolbar")
dlg
:button{text="Undo",onclick=function() app.command.Undo() end}
:button{text="Redo",onclick=function() app.command.Redo() end}
:button{text="|<",onclick=function() app.command.GotoFirstFrame() end}
:button{text="<",onclick=function() app.command.GotoPreviousFrame() end}
:button{text=">",onclick=function() app.command.GotoNextFrame() end}
:button{text=">|",onclick=function() app.command.GotoLastFrame() end}
:button{text="+",onclick=function() app.command.NewFrame() end}
:show{wait=false}
@dacap
dacap / Create 10 Frames.lua
Created Sep 20, 2018
Aseprite Script example
View Create 10 Frames.lua
app.transaction(
function()
for i=1,10 do
app.command.NewFrame()
end
end)
@dacap
dacap / en.ini.diff
Created Jul 25, 2018
en.ini v1.2.8 vs 1.2.9
View en.ini.diff
diff --git a/data/strings/en.ini b/data/strings/en.ini
index cd83ff874..9db2e4746 100644
--- a/data/strings/en.ini
+++ b/data/strings/en.ini
@@ -93,10 +93,15 @@ nothing_to_report = Crash Report<<Nothing to report||&OK
uninstall_extension_warning = <<<END
Warning
<<Do you really want to uninstall '{0}' extension?
||&Yes||&No
END
@dacap
dacap / magit-log (and expand log)
Created May 31, 2018
Using profiler-start / profiler-report with Magit
View magit-log (and expand log)
- command-execute 8910 59%
- call-interactively 8910 59%
- byte-code 8669 57%
- read-extended-command 8669 57%
- completing-read 8669 57%
- completing-read-default 8669 57%
- read-from-minibuffer 8628 57%
- redisplay_internal (C function) 8603 57%
- eval 8603 57%
- let* 8603 57%
@dacap
dacap / CMakeLists.txt
Last active Jun 4, 2018
Invalid RTTI with Clang on macOS (Apple LLVM version 9.1.0 (clang-902.0.39.1))
View CMakeLists.txt
cmake_minimum_required(VERSION 3.0)
add_library(lib lib.cpp)
add_executable(app app.cpp)
target_link_libraries(app lib)
target_compile_options(app PRIVATE -frtti)
target_compile_options(lib PRIVATE -fno-rtti)
You can’t perform that action at this time.