Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
WFH

Vin K elquimista

🏠
WFH
  • Woodstock, GA
View GitHub Profile
@elquimista
elquimista / yubikey-reset.sh
Created Mar 12, 2019 — forked from pkirkovsky/yubikey-reset.sh
Utility for resetting a Yubikey to factory defaults using gpg-connect-agent. This will wipe out any stored keys and reset PINs to default values.
View yubikey-reset.sh
gpg-connect-agent <<EOF
/hex
scd serialno
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40
@elquimista
elquimista / gpg2qrcode.sh
Last active Sep 9, 2021 — forked from joostrijneveld/gpg2qrcodes.sh
Produce printable QR codes for persistent, tangible storage of GPG private keys and vice versa.
View gpg2qrcode.sh
# Depends on:
# paperkey (jabberwocky.com/software/paperkey/)
# libqrencode (fukuchi.org/works/qrencode/)
# Producing the QR codes:
# Split into 16 codes to ensure the data per image is not too large.
gpg --export-secret-key KEYIDGOESHERE | paperkey --output-type raw | base64 > temp
split temp -n 16 IMG
for f in IMG*; do cat $f | qrencode -o $f.png; done
View keybase.md

Keybase proof

I hereby claim:

  • I am elquimista on github.
  • I am elquimista (https://keybase.io/elquimista) on keybase.
  • I have a public key ASCr74lc2fQNCYBPfzJyLmaNjXLjFUZ20qoWHUlclkK2fAo

To claim this, I am signing this object:

@elquimista
elquimista / docker-compose.yml
Created Feb 23, 2017
docker-compose.yml example
View docker-compose.yml
app:
build: .
command: ./docker-compose-command.sh
volumes:
- .:/code/vmware_ma
ports:
- 80:3000
links:
- postgres
stdin_open: true
@elquimista
elquimista / combinations.js
Created Nov 23, 2016
Calculate combinations count in Javascript (ES5)
View combinations.js
function combinationsCount(m, n) {
if (m < n) {
return 0;
} else if (m === n || n === 0) {
return 1;
} else {
var c = 1, i;
for (i = n + 1; i <= m; i ++) {
c *= i;
}
@elquimista
elquimista / components.js
Created Jul 18, 2016
Smart Text React.js Component
View components.js
window.SmartTextbox = React.createClass({
getInitialState() {
return {
closeButtonImageDataUrl: "data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDUwIDUwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MCA1MDsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSI1MTJweCIgaGVpZ2h0PSI1MTJweCI+CjxjaXJjbGUgc3R5bGU9ImZpbGw6I0Q3NUE0QTsiIGN4PSIyNSIgY3k9IjI1IiByPSIyNSIvPgo8cG9seWxpbmUgc3R5bGU9ImZpbGw6bm9uZTtzdHJva2U6I0ZGRkZGRjtzdHJva2Utd2lkdGg6MjtzdHJva2UtbGluZWNhcDpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDsiIHBvaW50cz0iMTYsMzQgMjUsMjUgMzQsMTYgICAiLz4KPHBvbHlsaW5lIHN0eWxlPSJmaWxsOm5vbmU7c3Ryb2tlOiNGRkZGRkY7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVjYXA6cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6MTA
View main.js
SVGAnimatedTransformList.prototype.translate = function (x, y) {
var xForms = this.baseVal,
xFormTranslate = undefined,
transform = undefined;
for (var i = 0, n = xForms.numberOfItems; i < n; i ++) {
transform = xForms.getItem(i);
if (transform.type === SVGTransform.SVG_TRANSFORM_TRANSLATE) {
xFormTranslate = transform;
break;