Skip to content

Instantly share code, notes, and snippets.

View gabrielfalcao's full-sized avatar
👨‍💻
probably writing tests

Gabriel Falcão gabrielfalcao

👨‍💻
probably writing tests
View GitHub Profile
@gabrielfalcao
gabrielfalcao / ffmpeg_frames.sh
Created January 7, 2023 06:26 — forked from loretoparisi/ffmpeg_frames.sh
Extract all frames from a movie using ffmpeg
# Output a single frame from the video into an image file:
ffmpeg -i input.mov -ss 00:00:14.435 -vframes 1 out.png
# Output one image every second, named out1.png, out2.png, out3.png, etc.
# The %01d dictates that the ordinal number of each output image will be formatted using 1 digits.
ffmpeg -i input.mov -vf fps=1 out%d.png
# Output one image every minute, named out001.jpg, out002.jpg, out003.jpg, etc.
# The %02d dictates that the ordinal number of each output image will be formatted using 2 digits.
ffmpeg -i input.mov -vf fps=1/60 out%02d.jpg
@gabrielfalcao
gabrielfalcao / fork-is-evil-vfork-is-good-afork-would-be-better.md
Created February 28, 2022 19:10 — forked from nicowilliams/fork-is-evil-vfork-is-good-afork-would-be-better.md
fork() is evil; vfork() is goodness; afork() would be better; clone() is stupid

I recently happened upon an implementation of popen() (different API, same idea) using clone(2), and so I opened an issue requesting use of vfork(2) or posix_spawn() for portability. It turns out that on Linux there's an important advantage to using clone(2). I think I should capture the things I wrote there in a better place. A gist, a blog, whatever.

So here goes.

Long ago, I, like many Unix fans, thought that fork(2) and the fork-exec process spawning model were the greatest thing, and the Windows sucked for only having [exec*()](http://pubs.opengroup.org/onlinepubs/9699919

Black Lives Matter!
Please check out ways you can help out the movement:
https://blacklivesmatters.carrd.co/
@gabrielfalcao
gabrielfalcao / segfault.py
Created December 19, 2019 14:33 — forked from coolreader18/segfault.py
Make CPython segfault in 5 lines of code.
class E(BaseException):
def __new__(cls, *args, **kwargs):
return cls
def a(): yield
a().throw(E)
@gabrielfalcao
gabrielfalcao / stylish.css
Created June 21, 2018 15:25 — forked from amitmerchant1990/stylish.css
Revert back to good old GitHub Homepage
/**
1. Install the Stylish(https://chrome.google.com/webstore/detail/stylish/fjnbnpbmkenffdnngjfgmeleoegfcffe?hl=en) extension for Chrome.
2. Open up extension options and paste the CSS mentioned below.
3. Specify the "URLs on the domain" to be `github.com`.
4. Add a title and save.
*/
.dashboard-sidebar {
float: right;
padding-right: 10px;

Sphinx themes

Built-in themes

Basic

  • basic
  • default
  • epub
@gabrielfalcao
gabrielfalcao / vpn.md
Created February 14, 2018 10:17 — forked from joepie91/vpn.md
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

(A Russian translation of this article can be found here, contributed by Timur Demin.)

Why not?

@gabrielfalcao
gabrielfalcao / vpn.md
Created February 14, 2018 10:17 — forked from joepie91/vpn.md
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

(A Russian translation of this article can be found here, contributed by Timur Demin.)

Why not?