This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# width not divisible by 2 というエラーが出る場合は -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" を追加する | |
ffmpeg -loop 1 -i blue.jpg -i ~/Desktop/aa.mp3 -shortest -b:a 320000 -pix_fmt yuv420p -vcodec libx264 out.mp4 | |
# そもそもアップロードできない | |
# ffmpeg -loop 1 -i black.jpg -i input.mp3 -shortest -b 1000k -vcodec libx264 out.mp4 | |
# これだとtwitterでは音がきこえなかった | |
# ffmpeg -loop 1 -i black.jpg -i input.mp3 -shortest -b 1000k -acodec copy out.mp4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CLIENT_ID="****" | |
CLIENT_SECRET="****" | |
USER_NAME="****" | |
USER_PASSWORD="****" | |
curl -X POST -A "User agent" -d "grant_type=password&username=$USER_NAME&password=$USER_PASSWORD" --user "$CLIENT_ID:$CLIENT_SECRET" https://www.reddit.com/api/v1/access_token | |
# output | |
# {"access_token": "****", "token_type": "bearer", "expires_in":3600, "scope": "*"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/raysan5/raylib/blob/3.0.0/examples/physics/physics_demo.c | |
import raylib | |
{.define: PHYSAC_NO_THREADS.} | |
include raylib/physac | |
const | |
screenWidth = 800 | |
screenHeight = 450 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- Makefile.org 2020-10-30 12:21:35.708751677 +0900 | |
+++ Makefile 2020-10-30 12:25:05.313747229 +0900 | |
@@ -574,15 +574,15 @@ | |
raygui.o : raygui.c raygui.h gui_textbox_extended.h ricons.h | |
$(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS) -D$(PLATFORM) -DRAYGUI_IMPLEMENTATION | |
raygui.c: | |
- echo '#define RAYGUI_IMPLEMENTATION' > raygui.c | |
echo '#include "$(RAYLIB_MODULE_RAYGUI_PATH)/raygui.h"' >> raygui.c | |
# Compile physac module |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/raysan5/raylib/blob/3.0.0/examples/models/models_first_person_maze.c | |
# | |
# $ cd examples/models | |
# $ nim r -p:../../src models_first_person_maze.nim | |
import raylib | |
proc free(p: pointer) {. | |
importc, header: "<stdlib.h>".} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import strutils | |
# Go version: https://github.com/prologic/monkey-lang/blob/master/parser/parser_tracing.go | |
# | |
# when defined(trace): import ./parser_tracing | |
# [...] | |
# proc parseProgram(p: var Parser): PNode = | |
# when defined(trace): TRACE("parseProgram") | |
# | |
# $ nim r -d:trace src/parser.nim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import | |
sdl2/sdl, | |
sdl2/sdl_ttf as ttf | |
const | |
Title = "SDL2 App" | |
ScreenW = 640 # Window width | |
ScreenH = 480 # Window height | |
WindowFlags = 0 | |
RendererFlags = sdl.RendererAccelerated or sdl.RendererPresentVsync |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import nimsvg | |
const numFrames = 250 | |
type | |
Move = enum | |
Up, Right, Down, Left | |
Obj = object | |
x: float | |
y: float |
OlderNewer