Skip to content

Instantly share code, notes, and snippets.


Harish Karumuthil harish2704

View GitHub Profile
harish2704 / simple-db-migrator.php
Created Jul 20, 2022
Simple database migration tool written in php
View simple-db-migrator.php
* ॐ Om Brahmarppanam
* schema/migrator.php
* Created at: Thu Jul 20 2022 19:34:40 GMT+0530 (GMT+05:30)
* Copyright 2022 Harish Karumuthil <>
* Use of this source code is governed by an MIT-style
harish2704 / mysite.nginx.conf
Last active Jul 16, 2021
Adminer login plugin for authenticated reverse proxy setup. for eg: auth_request in nginx
View mysite.nginx.conf
location /dba/ {
auth_request /auth/check_login/;
error_page 403 /auth/login/;
# Server running dba tool
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
auth_request_set $auth_db_vendor $upstream_http_db_vendor;
harish2704 /
Last active May 11, 2020
Print URLs of rpm package instead of downloading while using zypper package manager ( OpenSUSE )
# Usage:
# pkg1 pk2 pkg3 ...
# This script actualy create a solver state and
# then derives urls from the sovler state.
solverDir=$(zypper install --debug-solver $@ | grep 'successfully at' | sed 's#Solver test case generated successfully at \(.*\).#\1#' )
harish2704 /
Created Apr 13, 2020
Download publicly accessible files from google drive using curl
#!/usr/bin/env bash
curl="curl -L -b $fCookie -c $fCookie"
$curl "$1" | grep jfk-button-action | sed -e 's/.*jfk-button-action" href="\(\S*\)".*/\1/' -e 's/\&amp;/\&/g'
harish2704 / gen-knex-migration.ejs
Created Feb 5, 2020
Create knex.js migration for existing database. Input Database structure in the form of create table SQL statements, and this ejs template can create Knex.js migration
View gen-knex-migration.ejs
const Parser = require('sql-ddl-to-json-schema');
const fs = require('fs');
const [ sqlFileName ] = argv;
if( !sqlFileName ) throw new Error('SQL file not specified');
const parser = new Parser('mysql');
parser.feed( fs.readFileSync( sqlFileName, 'utf-8'));
const data = parser.toCompactJson();
harish2704 / express-dump-server.js
Created Jan 23, 2020
A dummy express server which will dump headers , url , method & body of the request
View express-dump-server.js
const express = require('express')
const app = express()
const port = process.env.PORT || 3002
app.use(express.urlencoded({ extended: true }));
app.use(function( req, res ){
const data = {
method: req.method,
harish2704 / new-bash-session
Created Jan 18, 2020
Create a new bash session and save/load all the command history in current directory
View new-bash-session
#!/usr/bin/env bash
export HISTFILE=$PWD/.bash_history
harish2704 /
Last active Jan 11, 2023
Generate ROOT CA and self signed certificates from localhost
#!/usr/bin/env bash
if [ -z "$1" ]; then
echo "Usage: <maindomain> [coma separated list of other domains]"
exit 1
harish2704 / CUDA-Tesla-p100-Colab.txt
Last active Dec 30, 2019
ROCm vs CUDA performance comparison based on training of image_ocr example from Keras
View CUDA-Tesla-p100-Colab.txt
python3 examples/
Using TensorFlow backend.
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/keras/backend/ The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/keras/backend/ The name tf.truncated_normal is deprecated. Please use tf.random.truncated_normal instead.
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/keras/backend/ The name tf.nn.max_pool is deprecated. Please use tf.nn.max_pool2d instead.
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/keras/backend/ The name tf.random_uniform is deprecated. Please use tf.random.uniform instead.
#!/usr/bin/env bash
fc-list :lang=$1
for i in $logins; do