This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
| license: gpl-3.0 |
| # Installation | |
| brew install ffmpeg --with-vpx --with-vorbis --with-libvorbis --with-vpx --with-vorbis --with-theora --with-libogg --with-libvorbis --with-gpl --with-version3 --with-nonfree --with-postproc --with-libaacplus --with-libass --with-libcelt --with-libfaac --with-libfdk-aac --with-libfreetype --with-libmp3lame --with-libopencore-amrnb --with-libopencore-amrwb --with-libopenjpeg --with-openssl --with-libopus --with-libschroedinger --with-libspeex --with-libtheora --with-libvo-aacenc --with-libvorbis --with-libvpx --with-libx264 --with-libxvid | |
| # Easy Peasy | |
| ffmpeg -i video.mp4 video.webm |
| // Copyright (c) 2017 Ismael Celis | |
| // Permission is hereby granted, free of charge, to any person obtaining a copy | |
| // of this software and associated documentation files (the "Software"), to deal | |
| // in the Software without restriction, including without limitation the rights | |
| // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| // copies of the Software, and to permit persons to whom the Software is | |
| // furnished to do so, subject to the following conditions: | |
| // The above copyright notice and this permission notice shall be included in all |
Magic words:
psql -U postgresSome interesting flags (to see all, use -h or --help depending on your psql version):
-E: will describe the underlaying queries of the \ commands (cool for learning!)-l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)| // Create our own MyResponseWriter to wrap a standard http.ResponseWriter | |
| // so we can store the status code. | |
| type MyResponseWriter struct { | |
| status int | |
| http.ResponseWriter | |
| } | |
| func NewMyResponseWriter(res http.ResponseWriter) *MyResponseWriter { | |
| // Default the status code to 200 | |
| return &MyResponseWriter{200, res} |
| version: '2' | |
| services: | |
| nsqlookupd: | |
| image: nsqio/nsq:v0.3.7 | |
| command: /nsqlookupd | |
| ports: | |
| - "4160" | |
| - "4161" | |
| nsqd: |
| # Tested with kernel: 4.9.20-040920-generic | |
| # | |
| # Make sure to install following packages | |
| # | |
| sudo apt install acpi acpi-call-dkms | |
| # | |
| # To manually disable, you can run the following command | |
| # |