Skip to content

Instantly share code, notes, and snippets.

View talwrii's full-sized avatar

talwrii talwrii

View GitHub Profile
@talwrii
talwrii / jqcheatsheet.md
Last active December 16, 2020 15:13
jq cheatsheet

jq cheatsheet

Extract field from list of objects

jq 'map(.foo)'

[ { foo: 1 }, { foo: 2 } ]
[1, 2]
#!/bin/bash
# A stupid encrypted calculator
echo 'Creating private key'
openssl genrsa 1025 > /tmp/key.pem
echo 'Creating a request that a CA may sign'
openssl req -new -key /tmp/key.pem -config config > /tmp/cert-request
echo 'Acting as a CA and self-signing certifate'
@talwrii
talwrii / yas-edit.el
Created March 25, 2017 09:22
Start defining a snippet if it does not exist
;; yas-edit.el -- Quickly edit yas snippets
;; Copyright Tal Wrii ([email protected])
;; LICENSED UNDER GPLv3
(require 'yasnippet)
(defvar yas-edit-callback nil)
(defvar yas-edit-last nil "The last snippet expanded")
(defun yas-edit (prefix)
(interactive "P")

2017-04-13 Emacs meeting at skills matter

DISCLAIMER

These notes are the noter-takers interpretations of the interesting information in the talks.

The order of the material is not maintained, and some content is omitted.

Additional interpretation of the material has been added and though some of this is marked as such, other interpretations likely are not.

I would like to thank the authors for their talks.

@talwrii
talwrii / notes.org
Last active April 13, 2017 23:00
Notes from emacs meetup at skills matter london April 2017

2017-04-13 Emacs meeting at skills matter

DISCLAIMER

These notes are the noter-taker’s interpretation of the interesting information in the talks.

The order of the material is not maintained, and some content is omitted. These notes were taken quite quickly so their may be factual errors

Additional interpretation of the material has been added and though some of this is marked as such, other interpretations likely are not.

I would like to thank the authors for their talks.

@talwrii
talwrii / dump-keys.el
Last active June 20, 2021 18:16
Dump emacs keybindings to standard out on the shell
;;; dump-keys.el -- Output emacs keybindings in a format suitable for grepping
;;; Maintained by Tal Wrii
;;; Copyright Tal Wrii 2017
;;; Copyright Justin Burkett 2015 (redistributed under GPLv3)
;;; This is highly influenced by Justin Burkett's which-keys.el
;;; and used its code as starting point
;;; Justin Burkett therefore has copyright over some of this code (as does Tal Wrii)
;;; Tal Wrii is of course responsible for everything bad about this code
@talwrii
talwrii / rules-to-write-better-commit-messages.md
Created September 5, 2018 21:15 — forked from medhatdawoud/rules-to-write-better-commit-messages.md
This gist is the summary of a video on YouTube [in Arabic] you can watch from here: https://youtu.be/BTlL-LBDCSI

Rules to write a better commit message

These are my preferences for a good commit message, feel free to fork this gist and add your own standards, or add comment here to share yours with the community.

1. Include only the files related to the feature you are implementing:

  • Don't add any file that is not related to the main issue, you can make it in a separate commit.
  • Separating files that not related is important in the revert cases.
  • Revise the whole changes always before committing and make sure to mention each change you made in the message.

2. Commit subject should be concise and reflect the essence of the commit:

  • Imagine the commit as an Email to the owner or your team mates.
  • Subject in the first and main sentence of the commit, it should be concise and to the point.
  • It shouldn't exceed 50 char.