Skip to content

Instantly share code, notes, and snippets.

View scriptkkiddie's full-sized avatar
🎯
Focusing & Building...

Shobhit Sharma scriptkkiddie

🎯
Focusing & Building...
View GitHub Profile
@scriptkkiddie
scriptkkiddie / README.MD
Created July 22, 2023 09:10
Java: The Dice Problem
class Main {
    public static void main (String[] args) {

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int dice = 7;

        for(int i = 1; i <= N; i++) {
 int x = sc.nextInt();
@scriptkkiddie
scriptkkiddie / README.MD
Created March 1, 2023 02:41
File Reader Prototype in Golang
package main

import (
	"bufio"
	"log"
	"os"
)

func main() {
@scriptkkiddie
scriptkkiddie / README.MD
Created February 7, 2023 15:27
Jenkins Shared Library Sample Function in Groovy
def test(message)  {
    node {
        echo "INFO: ${message}"
    } 
}
@scriptkkiddie
scriptkkiddie / README.MD
Created January 23, 2023 10:04
Reading XLSX/Excel in Python with Pandas
import pandas as pd

df = pd.read_excel(xlFilePath)

where xlFilePath is where file located either in absolute or relative path.

@scriptkkiddie
scriptkkiddie / README.MD
Last active January 25, 2023 04:10
Random Array Generator with JavaScript
function randomArray(sizeOf) {

    arr = [];

    for (let i = 0; i < sizeOf; i++) {

        arr.push(Math.floor(Math.random() * 100)); 
    }
@scriptkkiddie
scriptkkiddie / README.MD
Created August 21, 2022 04:41
Iterate Elements from an Array in JavaScript
let ceoOfMNCs = ["Elon Musk", "Tim Cook", "Sundar Pichai", "Satya Nadella"];
for (let ceo of ceoOfMNCs){
  console.log(ceo);
}
@scriptkkiddie
scriptkkiddie / README.MD
Last active August 17, 2022 00:17
Podman REST API Service

Networking - Podman

Enabling REST API Service

Socket

sudo podman system service --time=0 \
unix:///run/podman/podman.sock
@scriptkkiddie
scriptkkiddie / ArrayExample.MD
Last active August 1, 2022 18:30
ArrayExample
entrepreneurs = ["Elon Musk", "Jeff Bezos", "Jack Ma"]
entrepreneurs = ["Elon Musk", "Jeff Bezos", "Jack Ma"];
import requests
import sys
import json
def waybackurls(host, with_subs):
if with_subs:
url = 'http://web.archive.org/cdx/search/cdx?url=*.%s/*&output=json&fl=original&collapse=urlkey' % host
else:
url = 'http://web.archive.org/cdx/search/cdx?url=%s/*&output=json&fl=original&collapse=urlkey' % host
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html expr:dir='data:blog.languageDirection' xmlns='http://www.w3.org/1999/xhtml' xmlns:b='http://www.google.com/2005/gml/b' xmlns:data='http://www.google.com/2005/gml/data' xmlns:expr='http://www.google.com/2005/gml/expr'>
<head>
<script type="text/javascript" src="http://s.hatena.com/js/HatenaStar.js"></script>
<script type="text/javascript">
Hatena.Star.Token = 'da1b86e8a86a29f912223bd7934849db79663de4';
</script>
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>