Skip to content

Instantly share code, notes, and snippets.

View dsandor's full-sized avatar

David Sandor dsandor

View GitHub Profile
@dsandor
dsandor / gist:04b844e441ab6001cc839c03e619407d
Created April 22, 2022 12:48 — forked from devinodaniel/gist:8f9b8a4f31573f428f29ec0e884e6673
Generate SSH RSA Private/Public Key pair with Golang
// This shows an example of how to generate a SSH RSA Private/Public key pair and save it locally
package main
import (
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"encoding/pem"
"golang.org/x/crypto/ssh"
@dsandor
dsandor / remove_mcafee.md
Last active April 15, 2020 13:00 — forked from pjobson/remove_mcafee.md
OSX McAfee Removal

Removal of McAfee from OSX

Note: This was written in 2015, it may be out of date now.

There are a lot of commands here which I use sudo if you don't know what you're doing with sudo, especially where I rm you can severely screw up your system.

There are many reasons which you would want to remove a piece of software such as McAfee, such as not wanting it to hammer your CPU during work hours which seems like primetime for a virus scan.

I intend this to be a living document, I have included suggestions from peoples' replies.

@dsandor
dsandor / mongodb-s3-backup.sh
Created August 23, 2019 13:10 — forked from eladnava/mongodb-s3-backup.sh
Automatically backup a MongoDB database to S3 using mongodump, tar, and awscli (Ubuntu 14.04 LTS)
#!/bin/sh
# Make sure to:
# 1) Name this file `backup.sh` and place it in /home/ubuntu
# 2) Run sudo apt-get install awscli to install the AWSCLI
# 3) Run aws configure (enter s3-authorized IAM user and specify region)
# 4) Fill in DB host + name
# 5) Create S3 bucket for the backups and fill it in below (set a lifecycle rule to expire files older than X days in the bucket)
# 6) Run chmod +x backup.sh
# 7) Test it out via ./backup.sh
@dsandor
dsandor / 0-README.md
Last active June 8, 2017 12:47 — forked from sc0ttkclark/0-README.md
PhpStorm.app Mac integration with Tower.app for diff and merge - https://youtrack.jetbrains.com/issue/WI-26090

Changed Php to Web for use with WebStorm.

WebStorm.app Mac integration with Tower.app for diff and merge

You must place both files in the ~/Library/Application Support/com.fournova.Tower2/CompareTools/ directory and chmod +x webstorm.sh

This integration is based on the one I found for Beyond Compare's beta integration:

https://github.com/tednaleid/git-tower-beyond-compare-shim

angular.module('d3AngularApp', ['d3'])
.directive('d3Bars', ['$window', '$timeout', 'd3Service',
function($window, $timeout, d3Service) {
return {
restrict: 'A',
scope: {
data: '=',
label: '@',
onClick: '&'
},