Skip to content

Instantly share code, notes, and snippets.

View ALFmachine's full-sized avatar

Adam Flaxman ALFmachine

View GitHub Profile
@Integralist
Integralist / Hash Keys to Symbols.rb
Last active September 2, 2020 08:50
Convert Ruby Hash keys into symbols
hash = { 'foo' => 'bar' }
# Version 1
hash = Hash[hash.map { |k, v| [k.to_sym, v] }]
# Version 2
hash = hash.reduce({}) do |memo, (k, v)|
memo.tap { |m| m[k.to_sym] = v }
end
@vitorbritto
vitorbritto / rm_mysql.md
Last active July 5, 2024 17:22
Remove MySQL completely from Mac OSX

Remove MySQL completely

  1. Open the Terminal

  2. Use mysqldump to backup your databases

  3. Check for MySQL processes with: ps -ax | grep mysql

  4. Stop and kill any MySQL processes

  5. Analyze MySQL on HomeBrew:

    brew remove mysql
    
@tbonesteaks
tbonesteaks / mac-vagrant-howto.rst
Last active April 19, 2021 12:10
brew, vagrant, virtualbox, and vagrant file howto...

Vagrant on Mac w Virtualbox

NSoT engineers have built Vagrantfiles for you to deploy NSoT software in a multitude of linux environments. This tutorial will help you load a Macintonsh computer (OS X) with Vagrant, Virtual Box, and dependencies so that you can start virtual servers and test the software.

NSoT publishes complete installation instructions for linux distributions, branch versions, and Vagrantfiles in addition to, not an alternative for the pip install method:

$ pip-install nsot
@discostu105
discostu105 / cropAndStraightenBatch.jsx
Last active July 16, 2024 04:56 — forked from cyberrob-zz/cropAndStraightenBatch.jsx
An photoshop batch script for crop & straighten photo from Jeffrey Tranberry
// cropAndStraightenBatch.jsx
// Copyright 2006-2008
// Written by Jeffrey Tranberry
// Photoshop for Geeks Version 2.0
/*
Description:
This script demonstates how to batch process
a folder of images using the crop and straighten command
*/
@danielrbradley
danielrbradley / Pulumi+Prettier+ESLint-setup.md
Created October 22, 2019 10:03
Setting up ESLint & Prettier for Pulumi

Setting up ESLint & Prettier for Pulumi

This is my process for addint ESLint and Prettier support for a new Pulumi TypeScript project.

Install packages

yarn add -D @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint eslint-config-airbnb-base eslint-config-prettier eslint-plugin-import eslint-plugin-prettier prettier
@flaxhofr
flaxhofr / .zshrc
Last active December 6, 2022 03:42
aws sso auth utility
#!/bin/bash
export AWS_DEFAULT_REGION=$(aws configure get region)
export AWS_ACCOUNT_ID=$(aws configure get sso_account_id)
export AWS_ACCESS_KEY_ID=$(aws configure get aws_access_key_id)
export AWS_SECRET_ACCESS_KEY=$(aws configure get aws_secret_access_key)
export AWS_SESSION_TOKEN=$(aws configure get aws_session_token)
export AWS_DEFAULT_OUTPUT=json
export AWS_REGION=${AWS_DEFAULT_REGION}