View loc.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Install: https://github.com/warmans/golocc | |
for f in $(ls) | |
do | |
if [ -d "$f" ]; then | |
cd $f | |
golocc --no-vendor ./... | |
cd .. |
View add-border.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
for i in "$@"; do | |
echo Processing "$i" '=>' "x-$i" | |
convert "$i" -shave 5x5 -bordercolor black -border 5 "x-$i" | |
done |
View Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian | |
RUN mkdir -p /app/conf | |
# Assumption: Go generated project binary `prjbinary` | |
COPY prjbinary /app/prjbinary | |
COPY docker/conf/db.toml /app/conf/db.toml | |
# entrypoint.sh executes /app/prjbinary | |
# Before execution, based on MYENV, copies configs from vault to /app/conf/ |
View convert.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
## First convert .p12 cert to certificate and key .pem files: | |
openssl pkcs12 -in cert.p12 \ | |
-clcerts -nokeys -out usercert.pem | |
openssl pkcs12 -in cert.p12 \ | |
-nocerts -out userkey.pem -nodes |
View dynamodb.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Do `gem install aws-sdk` | |
require 'aws' | |
AWS.config(:access_key_id => 'ACCESS_KEY', :secret_access_key => 'SECRET_KEY') | |
db = AWS::DynamoDB.new | |
table = db.tables['subwiz_table'].load_schema | |
item = table.items.create(id: "subwiz") | |
item.attributes.add(followers: ["Ariel", "Mermaid"]) | |
item.attributes.add(following: ["Sunny", "Leone"]) |
View gist:dff5daccce97c57958ec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using System.Net.Http; | |
namespace HttpClientFDApi | |
{ | |
class FreshdeskTicketAttachmentApi | |
{ | |
static void Main(string[] args) | |
{ |
View debug.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -vx | |
echo Enabled Debug |