Skip to content

Instantly share code, notes, and snippets.

View sadmansk's full-sized avatar
🎯
Focusing

Sadman Kazi sadmansk

🎯
Focusing
View GitHub Profile
@tadly
tadly / rofi-emoji.sh
Last active June 14, 2024 16:40
Rofi emoji picker
#!/usr/bin/env bash
#
# Use rofi to pick emoji because that's what this
# century is about apparently...
#
# Requirements:
# rofi, xsel, xdotool, curl, xmllint
#
# Usage:
# 1. Download all emoji
@alexbatashev
alexbatashev / 1.java
Created December 31, 2015 13:07
Camera2 and MediaCodec
mSurfaceView.setAspectRatio(mPreviewSize.getWidth(), mPreviewSize.getHeight());
mediaCodec = MediaCodec.createEncoderByType("video/avc");
MediaFormat format = MediaFormat.createVideoFormat("video/avc", mVideoSize.getWidth(), mVideoSize.getHeight());
int colorFormat = MediaCodecInfo.CodecCapabilities.COLOR_FormatSurface;
int videoBitrate = 90000;
int videoFramePerSecond = 25;
int iframeInterval = 2;
format.setInteger(MediaFormat.KEY_COLOR_FORMAT, colorFormat);
@bpierre
bpierre / README.md
Last active February 15, 2024 18:40
Switch To Vim For Good

Switch To Vim For Good

NOTE: This guide has moved to https://github.com/bpierre/switch-to-vim-for-good

This guide is coming from an email I used to send to newcomers to Vim. It is not intended to be a complete guide, it is about how I switched myself.

My decision to switch to Vim has been made a long time ago. Coming from TextMate 1, I wanted to learn an editor that is Open Source (so I don’t lose my time learning a tool that can be killed), cross platform (so I can use it everywhere), and powerful enough (so I won’t regret TextMate). For these reasons, Vim has always been the editor I wanted to learn, but it took me several years before I did it in a way that works for me. I tried to switch progressively, using the Janus Vim distribution for a few months, then got back to using TextMate 2 for a time, waiting for the next attempt… here is what finally worked for me.

Original gist with comments: https://gist.github.com/bpierre/0a0025d348b6001394e0

@grugq
grugq / gist:03167bed45e774551155
Last active April 6, 2024 10:12
operational pgp - draft

Operational PGP

This is a guide on how to email securely.

There are many guides on how to install and use PGP to encrypt email. This is not one of them. This is a guide on secure communication using email with PGP encryption. If you are not familiar with PGP, please read another guide first. If you are comfortable using PGP to encrypt and decrypt emails, this guide will raise your security to the next level.