Skip to content

Instantly share code, notes, and snippets.

View praisegeek's full-sized avatar

Praise-God Emerenini praisegeek

View GitHub Profile
AWSTemplateFormatVersion: "2010-09-09"
Description: >
Launch a static website backed by an S3 bucket and served via https through cloudfront.
Assumes you have the following available already
* An address in mind (e.g. blog.example.com)
* An existing Route53 Hosted Zone for the domain
* A validated AWS ACM certificate arn for the desired web address which must be in eu-west-1
Parameters:
HostedZoneID:
Description: >
@praisegeek
praisegeek / osx-random-string.txt
Created January 29, 2021 19:49 — forked from rkasigi/osx-random-string.txt
OSX Generate Random String
openssl rand -base64 6
openssl rand -hex 4
openssl rand -base64 8 | md5 | head -c8;echo
openssl rand -base64 6
ping -c 1 yahoo.com |md5 | head -c8; echo
@praisegeek
praisegeek / clearTable.sh
Created June 18, 2020 12:27 — forked from pushplay/clearTable.sh
Delete all items (clear) in a DynamoDB table using bash
#!/bin/bash
TABLE_NAME=TableName
KEY=id
aws dynamodb scan --table-name $TABLE_NAME --attributes-to-get "id" --query "Items[].id.S" --output text | tr "\t" "\n" | xargs -t -I keyvalue aws dynamodb delete-item --table-name $TABLE_NAME --key '{"id": {"S": "keyvalue"}}'
import 'package:flutter/material.dart';
class AnimatedCount extends ImplicitlyAnimatedWidget {
AnimatedCount({
Key key,
@required this.count,
@required Duration duration,
Curve curve = Curves.linear,
}) : super(duration: duration, curve: curve, key: key);
@praisegeek
praisegeek / hlsdump.js
Created January 9, 2020 13:03 — forked from astro/hlsdump.js
Reliably record an HTTP Live Stream with node.js
var fs = require('fs');
var request = require('request');
var joinUrl = require('url').resolve;
if (process.argv.length != 3) {
console.log("Please pass playlist URL");
process.exit(1);
}
var plsUrl = process.argv[2];
var INTERVAL = 5 * 1000;
@praisegeek
praisegeek / iterm2-solarized.md
Created October 23, 2018 01:26 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k

@praisegeek
praisegeek / baseModel.php
Created August 6, 2018 15:57 — forked from nurrony/baseModel.php
#laravel #php A query scope for sorting and searching/filtering
<?php
/**
* Use this query scope from any model/controller
* It works on single table only, so for joined columns, make a mysql view and operate on that
* Example request fromat
*/
/*
[
'query' => [
@praisegeek
praisegeek / provisioning.sh
Created March 18, 2018 23:17 — forked from rydurham/provisioning.sh
Ubuntu Provisioning
# Basics
sudo apt update
sudo apt install curl vim git libpng-dev
# Ngninx
sudo apt install nginx
# Postgres
sudo apt install postgresql postgresql-contrib
sudo -i -u postgres
@praisegeek
praisegeek / git.md
Created February 22, 2018 10:02 — forked from brigand/git.md
My Git Aliases

I use git a lot for work and other projects, so I invested the time in creating some high quality aliases that really work for me. These just go in your bash profile (~/.bash_profile or ~/.bashrc or ~/.profile depending on your OS).

I see a lot of people go overboard with aliases, and then end up not using them. They're meant to cover 95% of the commands I use, not 100%.

alias gcam='git commit -am'
alias gs='git status'
alias gplr='git pull --rebase'
alias gpsh='git push'
alias gpo='git push -u origin `git symbolic-ref --short HEAD`'
@praisegeek
praisegeek / app-icons.js
Created February 6, 2018 18:36
Load vector icons as sourceMap in React Native
// Define all your icons once,
// load them once,
// and use everywhere
import Ionicons from 'react-native-vector-icons/Ionicons';
import FontAwesome from 'react-native-vector-icons/FontAwesome';
// define your suffixes by yourself..
// here we use active, big, small, very-big..
const replaceSuffixPattern = /--(active|big|small|very-big)/g;