Skip to content

Instantly share code, notes, and snippets.

@dbuentello
dbuentello / cloud9.md
Created September 17, 2021 22:14 — forked from jamstooks/cloud9.md
Notes on starting up an AWS Cloud9 Django dev environment with Python3

My AWS Cloud9 Setup for Python/Django and Node

Getting setup

sudo yum -y update

I'm not a big fan of their default bash prompt:

echo "export PS1='[\D{%F %T}]\n\[\e]0;\w\a\]\[\e[32m\]\u:\[\e[33m\]\w\[\e[0m\]\n\$ '" >> ~/.bashrc

source ~/.bashrc

@dbuentello
dbuentello / aws.upload-folder-to-s3.js
Created May 30, 2020 19:16 — forked from jlouros/aws.upload-folder-to-s3.js
Upload folder to S3 (Node.JS)
const AWS = require("aws-sdk"); // from AWS SDK
const fs = require("fs"); // from node.js
const path = require("path"); // from node.js
// configuration
const config = {
s3BucketName: 'your.s3.bucket.name',
folderPath: '../dist' // path relative script's location
};
@dbuentello
dbuentello / aws.upload-folder-to-s3.js
Created May 30, 2020 19:16 — forked from jlouros/aws.upload-folder-to-s3.js
Upload folder to S3 (Node.JS)
const AWS = require("aws-sdk"); // from AWS SDK
const fs = require("fs"); // from node.js
const path = require("path"); // from node.js
// configuration
const config = {
s3BucketName: 'your.s3.bucket.name',
folderPath: '../dist' // path relative script's location
};
@dbuentello
dbuentello / README-Template.md
Created March 6, 2019 20:51 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@dbuentello
dbuentello / git-backup-to-Backblaze-B2.sh
Created June 26, 2018 14:46 — forked from nilayp/git-backup-to-Backblaze-B2.sh
Complete git repository backup script to Backblaze B2
#!/bin/bash
# Script to backup git repo to Backblaze B2
# Set bucket, dir, password and account to use for the backup. I keep mine in local env vars
# These are set by localrc which lives on an encrypted home directory and is executed by my bashrc
# Ensure you have authorized the B2 command line tool with the correct account AND added your SSH
# public key to your github account, if you need to backup private repositories.
# To restore this repo in the future, download it from B2, extract it and then use this command:
# cd old-repository.git
@dbuentello
dbuentello / git-backup-to-Backblaze-B2.sh
Created June 26, 2018 14:46 — forked from nilayp/git-backup-to-Backblaze-B2.sh
Complete git repository backup script to Backblaze B2
#!/bin/bash
# Script to backup git repo to Backblaze B2
# Set bucket, dir, password and account to use for the backup. I keep mine in local env vars
# These are set by localrc which lives on an encrypted home directory and is executed by my bashrc
# Ensure you have authorized the B2 command line tool with the correct account AND added your SSH
# public key to your github account, if you need to backup private repositories.
# To restore this repo in the future, download it from B2, extract it and then use this command:
# cd old-repository.git
@dbuentello
dbuentello / osx_nmap_dmg_uninstall.sh
Created September 16, 2017 23:17
Uninstall nmap from osx installed via dmg
#!/bin/sh
receipts() {
find /private/var/db/receipts -iregex '.*/org\.insecure\.nmap.*'
}
bom_files() {
receipts | grep '\.bom$'
}
@dbuentello
dbuentello / t2_log_boot.js
Created September 1, 2016 13:09
Log tessel2 boot in a sane way.
// Because "hit enter as fast as you can"
/*
1. Requires serialport module (npm install serialport)
2. Run with node (node t2_log_boot.js)
3. Plug in tessel2.
*/
/* Figure out what port your tessel2 is plugged into and update the SERIAL_PORT variable. */
const SERIAL_PORT = '/dev/cu.usbmodem1412';
@dbuentello
dbuentello / IdeaVim OS X Key Repeat.markdown
Created February 9, 2016 09:46 — forked from lsd/IdeaVim OS X Key Repeat.markdown
Enable key-repeat for ALL applications or just for IdeaVim/specific JetBrains apps

Upgrading to Lion or Yosemite and WebStorm 9, I noticed key repeat was
turned off for the IdeaVim plugin h j k l keys.

System-wide key repeat

defaults write -g ApplePressAndHoldEnabled -bool false in a terminal will enable
key repeat for every app. This can alternatively be found in the accessibility settings in OS X' preferences.

App specific key repeat

// Restify Server CheatSheet.
// More about the API: http://mcavage.me/node-restify/#server-api
// Install restify with npm install restify
// 1.1. Creating a Server.
// http://mcavage.me/node-restify/#Creating-a-Server
var restify = require('restify');