Skip to content

Instantly share code, notes, and snippets.

kennyk / gource export
Created Feb 1, 2021
Export gource rendering to ppm mp4
View gource export
gource \
-s 30 \
-1280x720 \
--multi-sampling \
--stop-at-end \
--highlight-users \
--font-size 25 \
--output-ppm-stream - \
--output-framerate 30 \
--logo ~/Downloads/favicon.png \
kennyk / rapsberry_pi_streaming
Last active May 1, 2019
Notes on live streaming from raspberry pi
View rapsberry_pi_streaming
Compiling the libx264 library from source is relatively straightforward. You will need git installed to check out the latest version. Use the following commands to check out, compile & install libx264:
git clone git://
cd x264/
./configure --enable-static --enable-shared
make install
kennyk / gist:8104728b5d9be2b5fc33ca4688693ba3
Last active Feb 20, 2018
Delete local copies of remote branches
View gist:8104728b5d9be2b5fc33ca4688693ba3
Branches that are local only will not be touched.
Branches that have been deleted on remote but were not merged will show a notification but not be deleted on local.
If you want to delete those as well change `-d` to `-D`.
git fetch -p && git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -d
public static void unsetFlag(Intent intent, int flag) {
intent.setFlags(intent.getFlags() & (~flag));
kennyk / gist:04da1c2411911376d85c
Last active Aug 29, 2015
Batch delete git tags
View gist:04da1c2411911376d85c
#delete all remote tags containing "v0"
git ls-remote | grep tags | grep v0 | awk '/^(.*)(\s+)(.*[a-z])/ {print ":" $2}' | grep -v \{ | xargs git push origin
#delete all local tags containing "v0"
git tag -l | grep v0 | awk '/^(.*[a-z])/ {print $1}' | xargs git tag -d
kennyk / gist:1bd8143831ef9c5c97eb
Created Dec 1, 2014
View gist:1bd8143831ef9c5c97eb
public void onBindViewHolder(final SimpleViewHolder holder, int position) {
boolean isVertical = (mRecyclerView.getOrientation() == TwoWayLayoutManager.Orientation.VERTICAL);
final View itemView = holder.itemView;
final int itemId = mItems.get(position);
if (mLayoutId == R.layout.layout_staggered_grid) {