View simple-db-migrator.php
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
<?php | |
/* | |
* ॐ Om Brahmarppanam ॐ | |
* | |
* schema/migrator.php | |
* Created at: Thu Jul 20 2022 19:34:40 GMT+0530 (GMT+05:30) | |
* | |
* Copyright 2022 Harish Karumuthil <harish2704@gmail.com> | |
* | |
* Use of this source code is governed by an MIT-style |
View mysite.nginx.conf
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
location /dba/ { | |
auth_request /auth/check_login/; | |
error_page 403 /auth/login/; | |
# Server running dba tool | |
proxy_pass http://127.0.0.1:7777/; | |
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; |
View zypper-print-urls.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 | |
# Usage: | |
# zypper-print-urls.sh 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#' ) |
View gdrive_dl.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
#!/usr/bin/env bash | |
urlBase='https://drive.google.com' | |
fCookie=tmpcookies | |
curl="curl -L -b $fCookie -c $fCookie" | |
confirm(){ | |
$curl "$1" | grep jfk-button-action | sed -e 's/.*jfk-button-action" href="\(\S*\)".*/\1/' -e 's/\&/\&/g' | |
} |
View gen-knex-migration.ejs
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
<% | |
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(); |
View express-dump-server.js
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
const express = require('express') | |
const app = express() | |
const port = process.env.PORT || 3002 | |
app.use(express.text()); | |
app.use(express.json()); | |
app.use(express.urlencoded({ extended: true })); | |
app.use(function( req, res ){ | |
const data = { | |
method: req.method, |
View new-bash-session
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
#!/usr/bin/env bash | |
export HISTFILE=$PWD/.bash_history | |
bash |
View gen-cert.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
#!/usr/bin/env bash | |
if [ -z "$1" ]; then | |
echo "Usage: gen-cert.sh <maindomain> [coma separated list of other domains]" | |
exit 1 | |
fi | |
DomainName="$1"; | |
moreDomains="$2"; |
View CUDA-Tesla-p100-Colab.txt
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
``` | |
python3 examples/image_ocr.py | |
Using TensorFlow backend. | |
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/keras/backend/tensorflow_backend.py:541: 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/tensorflow_backend.py:4479: 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/tensorflow_backend.py:4267: 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/tensorflow_backend.py:4432: The name tf.random_uniform is deprecated. Please use tf.random.uniform instead. |
View myutils.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
#!/usr/bin/env bash | |
fonts_for_lang(){ | |
fc-list :lang=$1 | |
} | |
sshInTabs(){ | |
logins="$@" | |
for i in $logins; do |
NewerOlder