Skip to content

Instantly share code, notes, and snippets.

View dhavalsavalia's full-sized avatar
🦥
Procrastinating

Dhaval Savalia dhavalsavalia

🦥
Procrastinating
View GitHub Profile
@tly1980
tly1980 / EVP_BytesToKey.md
Last active September 20, 2022 08:51
EVP_BytesToKey implementation in other languages: Python, Node.js
@biggers
biggers / py_rotate_log_dict_config.py
Created December 19, 2017 19:23
Python3 rotating log-file configuration via "config.dictConfig"
import sys
import logging
import logging.config
import random
import string
# "thank you" to folks on StackOverflow.com for various ideas,
# for this example. Works with Python3.
@ibraheem4
ibraheem4 / postgres-brew.md
Last active April 19, 2025 14:27 — forked from sgnl/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@480
480 / gist:3b41f449686a089f34edb45d00672f28
Last active May 15, 2025 13:05
MacOS X + oh my zsh + powerline fonts + visual studio code terminal settings

MacOS X + oh my zsh + powerline fonts + visual studio code (vscode) terminal settings

Thank you everybody, Your comments makes it better

Install oh my zsh

http://ohmyz.sh/

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
@troyfontaine
troyfontaine / 1-setup.md
Last active May 15, 2025 22:58
Signing your Git Commits on MacOS

Methods of Signing Git Commits on MacOS

Last updated March 13, 2024

This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.

@robpearson
robpearson / NewMacSetup.md
Created August 2, 2017 23:36
New Mac Setup

New Mac Setup notes

Also see Casey Liss' new mac setup notes.

  • Setup as a new Mac. Provided Apple ID details etc.
  • Turned FileVault on as a part of the install process. Required for work as well.
  • Configure Sys Prefs
    • General - Dark Menu Bar and Dock
    • Touchpad - Set scroll direction to normal (not natural)
  • Desktop - Set background to Black Price 015.jpg
@danieleggert
danieleggert / GPG and git on macOS.md
Last active March 6, 2025 20:45
How to set up git to use the GPG Suite

GPG and git on macOS

Setup

No need for homebrew or anything like that. Works with https://www.git-tower.com and the command line.

  1. Install https://gpgtools.org -- I'd suggest to do a customized install and deselect GPGMail.
  2. Create or import a key -- see below for https://keybase.io
  3. Run gpg --list-secret-keys and look for sec, use the key ID for the next step
  4. Configure git to use GPG -- replace the key with the one from gpg --list-secret-keys

Simple Security Guidelines

Using an iDevice? (Best option)

  • Use an iPod or an iPad without a SIM card
  • Use an iPhone
  • Do not jailbreak
  • Always upgrade to new iOS versions
  • Use Brave browser

Need Secure chat?

@DanDiplo
DanDiplo / JS-LINQ.js
Last active May 8, 2025 17:25
JavaScript equivalents of some common C# LINQ methods. To help me remember!
// JS array equivalents to C# LINQ methods - by Dan B.
// First: This version using older JavaScript notation for universal browser support (scroll down for ES6 version):
// Here's a simple array of "person" objects
var people = [
{ name: "John", age: 20 },
{ name: "Mary", age: 35 },
{ name: "Arthur", age: 78 },
{ name: "Mike", age: 27 },