Skip to content

Instantly share code, notes, and snippets.

View robmarano's full-sized avatar
🎯
I may be slow to respond.

Rob Marano robmarano

🎯
I may be slow to respond.
View GitHub Profile
@noahcoad
noahcoad / easily-switch-accounts-in-aws.md
Last active December 13, 2023 06:40
Easily Switch Accounts in AWS with Role Switcher

Easily Switch Accounts in AWS

When working with multiple AWS accounts, it can be a pain to keep signing out and signing back in. I work with a number of accounts, my own, customer accts, burner accts, etc. It was a pain to keep logging in and out of the AWS Console. Thankfully the AWS Console has a "Role Switcher" that lets you quickly switch between accounts built-in. It does this by assuming a role from another account. Here's how to set that up...

@arya-oss
arya-oss / INSTALL.md
Last active November 18, 2023 13:58
Ubuntu 16.04 Developer Tools installation

Ubuntu 16.04 Developer Tools Installation

First things first !

sudo apt update
sudo apt upgrade

Standard Developer Tools

sudo apt-get install build-essential git
@eddies
eddies / setup-notes.md
Created July 29, 2016 08:00
Spark 2.0.0 and Hadoop 2.7 with s3a setup

Standalone Spark 2.0.0 with s3

###Tested with:

  • Spark 2.0.0 pre-built for Hadoop 2.7
  • Mac OS X 10.11
  • Python 3.5.2

Goal

Use s3 within pyspark with minimal hassle.

@hbrunn
hbrunn / rebuild_libreoffice.sh
Last active November 10, 2020 05:16
This is an instruction how to rebuild libreoffice on ubuntu trusty to use python-uno for python 2.7
# we need some fixes from 14.10
sudo add-apt-repository --enable-source ppa:libreoffice/libreoffice-4-3
# fetch this repository
sudo apt-get update
# update your libreoffice installation
sudo apt-get install libreoffice
# get all build dependencies for libreoffice
sudo apt-get build-dep libreoffice
# that strangely enough doesn't come with the above
sudo apt-get install gcj-jdk python-dev
@nelsonpecora
nelsonpecora / currency.js
Created March 7, 2014 22:00
AngularJS currency filter - trims to 2 decimal places and adds a currency mark
app.filter('nfcurrency', [ '$filter', '$locale', function ($filter, $locale) {
var currency = $filter('currency'), formats = $locale.NUMBER_FORMATS;
return function (amount, symbol) {
var value = currency(amount, symbol);
return value.replace(new RegExp('\\' + formats.DECIMAL_SEP + '\\d{2}'), '')
}
}]);
@tobert
tobert / cassandra.service
Created December 31, 2013 22:01
A systemd unit for Cassandra
[Unit]
Description=Cassandra
After=network.target
[Service]
Type=forking
PIDFile=/var/lib/cassandra/cassandra.pid
User=cassandra
Group=cassandra
ExecStart=/usr/bin/cassandra -p /var/lib/cassandra/cassandra.pid
@amberj
amberj / rgb-colored-echo.sh
Last active February 28, 2024 12:33
A bash pretty print script that provides following red/green/blue colored echo functions.
#!/bin/bash
#
## @file rgb-colored-echo.sh
## @author Amber Jain
## @section DESCRIPTION A bash pretty print script which provides red/green/blue colored echo functions
## @section LICENSE ISC
#################
# Documentation #
@coderofsalvation
coderofsalvation / RESTdoc
Last active June 7, 2022 01:43
Quickndirty bash-utility to generate REST-documentation from sourcecode comments into css-styles html (or plainhtml). Can be handy for inclusion into phpdoc/phpdoctor/doxygen-dochains, instead of using heavyweight alternatives.
#!/bin/bash
#
# A quickndirty bash-utility to generate REST-documentation from sourcecode comments.
# (initially aimed at php-files, but js should also work)
# Basically its a c-style comment -> markdown -> html converter
# Dependancies:
# - awk
# - sed
# - bash
# - php
@clayrichardson
clayrichardson / multiprocessing_test.py
Created August 15, 2012 10:35
Python Multiprocessing Queues and Pipes
import sys
import time
import random
import signal
import multiprocessing
processes = []
def launch_process(number, kill_queue, child_connection):
@oodavid
oodavid / README.md
Created March 26, 2012 17:05
Backup MySQL to Amazon S3

Backup MySQL to Amazon S3

This is a simple way to backup your MySQL tables to Amazon S3 for a nightly backup - this is all to be done on your server :-)

Sister Document - Restore MySQL from Amazon S3 - read that next

1 - Install s3cmd

this is for Centos 5.6, see http://s3tools.org/repositories for other systems like ubuntu etc