Skip to content

Instantly share code, notes, and snippets.

View michaelrios's full-sized avatar

Michael Rios michaelrios

  • Los Angeles, CA
View GitHub Profile
@michaelrios
michaelrios / truncate_dynamodb_table.sh
Created April 3, 2021 00:28
Truncate a DynamoDB table for a given Partition Key prefix
#!/bin/bash
####
#### Deletes all rows from a given TABLE_NAME with a given PK PREFIX
####
#### This does do a FULL TABLE SCAN, and can be expensive
####
#### It does require you have a package called jq for parsing json, but you can get that through brew, apt-get, etc…
####
@michaelrios
michaelrios / AppServiceProvider.php
Created August 17, 2017 20:26 — forked from wells/AppServiceProvider.php
API Versioning in Laravel AppServiceProvider
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
alias editAliases="vim ~/.bash_aliases && source ~/.bash_aliases"
alias newSource="source ~/.zshrc"
alias gs="git status"
alias ga="git add"
alias g.="git add ."
alias gd="git branch -d"
gcom () {
branch=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p')
git commit -m "$branch: $1"