Skip to content

Instantly share code, notes, and snippets.

View Panky-codes's full-sized avatar
💻
I like to count from 0 and not 1.

Pankaj Raghav Panky-codes

💻
I like to count from 0 and not 1.
View GitHub Profile
set realname="Luis Chamberlain"
set from="mcgrof@kernel.org"
set use_from=yes
set pgp_default_key="0xCE231D0A309288A7"
set pgp_sign_as="0x088D02AC047A60A0"
set crypt_replyencrypt = yes
set crypt_replysign = yes
set crypt_replysignencrypted = yes
@yegappan
yegappan / VimScriptForPythonDevelopers.MD
Last active January 12, 2024 10:51
Vim script for Python Developers

Vim Script for Python Developers

This is a guide to Vim Script development for Python developers. Sample code for the various expressions, statements, functions and programming constructs is shown in both Python and Vim Script. This is not intended to be a tutorial for developing Vim scripts. It is assumed that the reader is familiar with Python programming.

For an introduction to Vim Script development, refer to usr_41.txt, eval.txt and Learn Vimscript the Hard Way

For a guide similar to this one for JavaScript developers, refer to Vim Script for the JavaScripter

This guide only describes the programming constructs that are present in both Python and Vim. The constructs that are unique to Vim (e.g. autocommands, [key-mapping](https://vimhelp.org/map.txt.html#key-m

@artizirk
artizirk / gnupg_scdaemon.md
Last active June 14, 2024 22:21
OpenPGP SSH access with Yubikey and GnuPG

NB: This document describles a 'Old-School' way of using Yubikey with SSH

Modern OpenSSH has native support for FIDO Authentication. Its much simpler and should also be more stable with less moving parts. OpenSSH also now has support for signing arbitary files witch can be used as replacement of gnupg. Git also supports signing commits/tags with ssh keys.

Pros of FIDO

  • Simpler stack / less moving parts
  • Works directly with ssh, ssh-add and ssh-keygen on most computers
  • Simpler
  • Private key can never leave the FIDO device

Cons of FIDO

@fasiha
fasiha / README.md
Created August 18, 2016 00:33
clang-format.py for Vim integration with python3: from https://reviews.llvm.org/D23319

The current clang-format instructions are for Python2 Vim. If your Vim has only Python3 or if you load Python3 before Python2, those instructions won't work.

Therefore, (1) replace your clang-format.py with the file in this gist, from https://reviews.llvm.org/D23319. (2) Replace the relevant lines in .vimrc with:

map <C-K> :py3f ~/PATH/TO/clang-format.py<cr>
imap <C-K> <c-o>:py3f ~/PATH/TO/clang-format.py<cr>

N.B. Replace ~/PATH/TO with the actual path to clang-format.py.

@pdp7
pdp7 / adafruit beaglebone cape universal spi pin config.txt
Created June 30, 2016 05:30
adafruit beaglebone cape universal spi pin config
Here is example of configuring the SPI0 pins.
First, verify cape unverisal is loaded:
[quote]
root@beaglebone:~# cat /sys/devices/platform/bone_capemgr/slots
0: PF---- -1
1: PF---- -1
2: PF---- -1
3: PF---- -1
4: P-O-L- 0 Override Board Name,00A0,Override Manuf,cape-universaln