Skip to content

Instantly share code, notes, and snippets.

View subwiz's full-sized avatar

Subhash Chandran subwiz

View GitHub Profile
subwiz /
Created September 27, 2017 16:40
LOC of Go packages
# Install:
for f in $(ls)
if [ -d "$f" ]; then
cd $f
golocc --no-vendor ./...
cd ..
subwiz /
Last active July 28, 2017 06:06
Imagic Magick script to add border to images. To install Imagic Magick: `brew update && brew install imagemagick`.
for i in "$@"; do
echo Processing "$i" '=>' "x-$i"
convert "$i" -shave 5x5 -bordercolor black -border 5 "x-$i"
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
# executes /app/prjbinary
# Before execution, based on MYENV, copies configs from vault to /app/conf/
subwiz /
Last active January 27, 2023 03:34
Go HTTP client using pkcs12 certificate
## 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
# Do `gem install aws-sdk`
require 'aws'
AWS.config(:access_key_id => 'ACCESS_KEY', :secret_access_key => 'SECRET_KEY')
db =
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"])
subwiz / gist:dff5daccce97c57958ec
Created September 16, 2014 06:23
C# Example for Creating Freshdesk Ticket With Attachment
using System;
using System.IO;
using System.Net.Http;
namespace HttpClientFDApi
class FreshdeskTicketAttachmentApi
static void Main(string[] args)
subwiz /
Created January 28, 2014 12:47
set -vx
echo Enabled Debug