Skip to content

Instantly share code, notes, and snippets.

View tejzpr's full-sized avatar

Tejus tejzpr

View GitHub Profile

Keybase proof

I hereby claim:

  • I am tejzpr on github.
  • I am tejzpr (https://keybase.io/tejzpr) on keybase.
  • I have a public key ASAyqS7BrrmWS1qGZCUd1x--BNCoMgP8QHORWMe0RH6sNwo

To claim this, I am signing this object:

@tejzpr
tejzpr / strstr.go
Created April 1, 2021 22:07
strstr in go
package main
import (
"fmt"
"strings"
)
func main() {
fmt.Println(strstr("Hello how how are you", "How"))
}
@tejzpr
tejzpr / server.go
Created July 18, 2022 22:51 — forked from xcsrz/server.go
A golang web server on a randomly (os) chosen port.
package main
import (
"fmt"
"github.com/skratchdot/open-golang/open"
"net"
"net/http"
)
func main() {
@tejzpr
tejzpr / gist:0e13d4e6eb6fa03015ad4ba272d74ca9
Last active April 27, 2023 01:35
Servicenow: oAuth Password grant authentication
(function execute(inputs, outputs) {
var provider = new sn_cc.StandardCredentialsProvider();
var credential = provider.getCredentialByID("credential_id");
var user = credential.getAttribute("user_name");
var pass = credential.getAttribute("password");
var oAuthClient = new sn_auth.GlideOAuthClient();
var params ={grant_type:"password", username:user, password:pass};
var json = new global.JSON();
var extraParams = json.encode(params);