Skip to content

Instantly share code, notes, and snippets.

View kishorevaishnav's full-sized avatar
Focused.

Kishore Kumar kishorevaishnav

Focused.
View GitHub Profile

Keybase proof

I hereby claim:

  • I am kishorevaishnav on github.
  • I am kishorevaishnav (https://keybase.io/kishorevaishnav) on keybase.
  • I have a public key ASAsxA7xHHyNgzwQwPWTAZoYUHbv8E7XheSxvbewzTt4VQo

To claim this, I am signing this object:

@kishorevaishnav
kishorevaishnav / changeWorkSheetName.vb
Last active March 29, 2018 18:59
change all worksheet's name of XLSX
Sub ChangeWorkSheetName()
'Updateby20140624
Dim Rng As Range
Dim WorkRng As Range
On Error Resume Next
xTitleId = "KutoolsforExcel"
newName = Application.InputBox("Name", xTitleId, "", Type:=2)
For i = 1 To Application.Sheets.Count
Application.Sheets(i).Name = newName & i
Next
### The below commands are used to change all the Datasources from one to another for JasperSoft Server configuations during export import process.
rm -rf /tmp/test_export
mkdir /tmp/test_export
cp export.zip /tmp/test_export
cd /tmp/test_export
unzip export.zip
find ./ -type f | xargs sed -i 's/delt_cp_api/multi_contractport_api/g'
zip -r -x export.zip new_export.zip *
cd -
@kishorevaishnav
kishorevaishnav / ALTER FUNCTION OWNER
Created September 15, 2016 18:50
ALTER FUNCTION OWNER
SELECT 'ALTER FUNCTION '||p.proname || '('||oidvectortypes(p.proargtypes)||') OWNER TO "'||current_catalog||'";'
FROM pg_catalog.pg_proc p
LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace
WHERE pg_catalog.pg_function_is_visible(p.oid)
AND n.nspname <> 'pg_catalog'
AND n.nspname <> 'information_schema'
AND p.probin IS NULL;
@kishorevaishnav
kishorevaishnav / gist:90079db8730a6e0b5544
Created January 25, 2015 18:17
Simple HTTP & Static rendering in Go
package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
)
var INDEX_HTML []byte
@kishorevaishnav
kishorevaishnav / gist:eae130fc4e45d80bfff9
Last active August 29, 2015 14:11
Go - XML - Attributes & its value
package main
import (
"encoding/xml"
"fmt"
)
type Embed struct {
XMLName xml.Name `xml:"Embed"`
Body string `xml:"Body,omitempty"`
@kishorevaishnav
kishorevaishnav / gist:198f2b89f561b3513950
Created October 27, 2014 00:37
revel build / install error
17:34 $ go build
watcher.go:4:2: cannot find package "gopkg.in/fsnotify.v1" in any of:
/usr/local/Cellar/go/1.3.1/libexec/src/pkg/gopkg.in/fsnotify.v1 (from $GOROOT)
/Users/kishore/gothings/src/gopkg.in/fsnotify.v1 (from $GOPATH)
~/gothings/src/github.com/revel/revel [master|✚ 2]
17:34 $ go install
watcher.go:4:2: cannot find package "gopkg.in/fsnotify.v1" in any of:
/usr/local/Cellar/go/1.3.1/libexec/src/pkg/gopkg.in/fsnotify.v1 (from $GOROOT)
/Users/kishore/gothings/src/gopkg.in/fsnotify.v1 (from $GOPATH)
# Routes
# This file defines all application routes (Higher priority routes first)
# ~~~~
module:testrunner
GET / App.Index
# Ignore favicon requests
GET /favicon.ico 404
@kishorevaishnav
kishorevaishnav / gist:9b53eee58eadf7c1ce6d
Created May 15, 2014 19:37
Restore Postgres tbz file.
bunzip2 <filename>.tbz
pg_restore --clean -U <db_user_name> -d <database_name> -F tar -v <filename_tar_file>.tar