Skip to content

Instantly share code, notes, and snippets.

View zazazack's full-sized avatar

Zachary Wilson zazazack

View GitHub Profile
@ajxchapman
ajxchapman / README.md
Last active May 1, 2024 06:32
Install Windows on Digital Ocean droplet
@mofax
mofax / index.js
Created March 2, 2017 08:15
automatically require all files inside a directory via an index.js
'use strict';
let fs = require('fs');
let path = require('path');
function snakeToCamel(s) {
let strings = s.split('_').map((str, index) => {
if (index === 0) return str;
return str.replace(/(^| )(\w)/g, function (x) {
return x.toUpperCase();
@PieterScheffers
PieterScheffers / start_docker_registry.bash
Last active October 29, 2023 18:26
Start docker registry with letsencrypt certificates (Linux Ubuntu)
#!/usr/bin/env bash
# install docker
# https://docs.docker.com/engine/installation/linux/ubuntulinux/
# install docker-compose
# https://docs.docker.com/compose/install/
# install letsencrypt
# https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04
@jaibeee
jaibeee / brew-perms.sh
Last active February 15, 2024 22:49
Configure homebrew permissions to allow multiple users on MAC OSX. Any user from the admin group will be able to manage the homebrew and cask installation on the machine.
#!/bin/sh
# Configure homebrew permissions to allow multiple users on MAC OSX.
# Any user from the admin group will be able to manage the homebrew and cask installation on the machine.
# allow admins to manage homebrew's local install directory
chgrp -R admin /usr/local
chmod -R g+w /usr/local
# allow admins to homebrew's local cache of formulae and source files
chgrp -R admin /Library/Caches/Homebrew
chmod cheat sheet
PERMISSION COMMAND
U G W
_____________________________________
|rwx rwx rwx chmod 777 <filename> |
|_____________________________________|
|rwx rwx r-x chmod 775 <filename> |
|_____________________________________|
@matthutchinson
matthutchinson / launch_instance.rb
Created January 23, 2012 15:10
Launching EC2 instance with aws-sdk gem
#!/usr/bin/ruby
# README
# gem install aws-sdk
# add this to bashrc
# export HT_DEV_AWS_ACCESS_KEY_ID=????
# export HT_DEV_AWS_SECRET_ACCESS_KEY=????
# put your pem file in ~/.ssh and chmod 0400
# for more info see; https://rubygems.org/gems/aws-sdk