Skip to content

Instantly share code, notes, and snippets.

View jivanpal's full-sized avatar

Jivan Pal jivanpal

View GitHub Profile
@MatthewVance
MatthewVance / restic-aws-daily.service
Created May 18, 2019 15:08
Example script and systemd scheduled service to sync local repo to AWS S3. This is if you prefer to backup locally on your network and sync a copy to S3 rather than use Restic to automatically interface with a S3 based repo.
[Unit]
Description=Runs daily aws sync script
[Service]
Type=oneshot
ExecStart=/etc/restic/aws.sh
@ulasozguler
ulasozguler / remove_sl_icon.sh
Created February 4, 2017 18:58
Remove spotlight icon from menu bar.
cd /System/Library/CoreServices/Spotlight.app/Contents/MacOS
sudo cp Spotlight Spotlight.bak
sudo perl -pi -e 's|(\x00\x00\x00\x00\x00\x00\x47\x40\x00\x00\x00\x00\x00\x00)\x42\x40(\x00\x00\x80\x3f\x00\x00\x70\x42)|$1\x00\x00$2|sg' Spotlight
cmp -l Spotlight Spotlight.bak
sudo codesign -f -s - Spotlight
sudo killall Spotlight
@tjormola
tjormola / gist:98efc0c8eb8219d4a48ab75465e468c0
Created July 18, 2016 22:48
TLS protected LDAP connection problem with Postfix doing ldap_table lookups from ActiveDirectory
############################################################
# Story: Postfix 3.1.0 as packaged in Ubuntu 16.04 xenial
# fails to open a STARTTLS initiated TLS protected connection
# to LDAP when using ldap_table for
# e.g. virtual_mailbox_domains with error
#
# Unable to allocate new TLS context -1: Can't contact LDAP server
#
# The target LDAP is an ActiveDirectory instance implemented
# by Samba 4.4.5. Certificate chain is ok with a custom CA.
@atoponce
atoponce / gist:07d8d4c833873be2f68c34f9afc5a78a
Last active July 17, 2024 07:03 — forked from tqbf/gist:be58d2d39690c3b366ad
Cryptographic Best Practices

Cryptographic Best Practices

Putting cryptographic primitives together is a lot like putting a jigsaw puzzle together, where all the pieces are cut exactly the same way, but there is only one correct solution. Thankfully, there are some projects out there that are working hard to make sure developers are getting it right.

The following advice comes from years of research from leading security researchers, developers, and cryptographers. This Gist was [forked from Thomas Ptacek's Gist][1] to be more readable. Additions have been added from