Skip to content

Instantly share code, notes, and snippets.

View sant-sh's full-sized avatar

Santosh sant-sh

  • Bangalore
View GitHub Profile
View shell-help.bash
#!/bin/bash
###
### my-script — does one thing well
###
### Usage:
### my-script <input> <output>
###
### Options:
### <input> Input file to read.
### <output> Output file to write. Use '-' for stdout.
@sant-sh
sant-sh / bua.sh
Created July 4, 2020 11:33
Bua khtm che
View bua.sh
username="santsah"
current_user="$USER"
start_time="$(date +%M)"
end_time="$(expr $start_time + 1)"
while [ "$end_time" > "$start_time" ]
do
if [[ "$current_user" == "$username" ]]
then
@sant-sh
sant-sh / pool_cx_oracle.py
Created December 29, 2018 16:50 — forked from Calzzetta/pool_cx_oracle.py
Connection pool with cx_Oracle
View pool_cx_oracle.py
import cx_Oracle
def perform_query(query, bind_variables):
connection = db_pool.acquire()
cursor = connection.cursor()
cursor.execute(query, bind_variables)
result = cursor.fetchall()
cursor.close()
db_pool.release(connection)
return result
@sant-sh
sant-sh / scp.md
Created August 6, 2018 08:39 — forked from michaelminter/scp.md
scp examples # command line, linux, mac
View scp.md

#Example syntax for Secure Copy (scp)

##What is Secure Copy?

scp allows files to be copied to, from, or between different hosts. It uses ssh for data transfer and provides the same authentication and same level of security as ssh.

###Examples

Copy the file "foobar.txt" from a remote host to the local host

View Python Assignment
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# 1. To Check Harshad No"
]
},
{