Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Kishore Kumar Vaishnav kishorevaishnav

🎯
Focusing
View GitHub Profile
View Keybase.md

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 Mar 29, 2018
change all worksheet's name of XLSX
View changeWorkSheetName.vb
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
View gist:60f2cffdfa1927d8fa3b1acb12d5b14f
### 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 -
View 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 Jan 25, 2015
Simple HTTP & Static rendering in Go
View gist:90079db8730a6e0b5544
package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
)
var INDEX_HTML []byte
@kishorevaishnav
kishorevaishnav / gist:eae130fc4e45d80bfff9
Last active Aug 29, 2015
Go - XML - Attributes & its value
View gist:eae130fc4e45d80bfff9
package main
import (
"encoding/xml"
"fmt"
)
type Embed struct {
XMLName xml.Name `xml:"Embed"`
Body string `xml:"Body,omitempty"`
View gist:198f2b89f561b3513950
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)
View gist:4136a49a9a5818dbcc5c
# Routes
# This file defines all application routes (Higher priority routes first)
# ~~~~
module:testrunner
GET / App.Index
# Ignore favicon requests
GET /favicon.ico 404
View gist:9b53eee58eadf7c1ce6d
bunzip2 <filename>.tbz
pg_restore --clean -U <db_user_name> -d <database_name> -F tar -v <filename_tar_file>.tar
You can’t perform that action at this time.