Skip to content

Instantly share code, notes, and snippets.

View krsoninikhil's full-sized avatar

Nikhil Soni krsoninikhil

View GitHub Profile
@krsoninikhil
krsoninikhil / kafka.go
Last active June 6, 2023 13:29
Kafka client to create topic and ACLs for a SCRAM user using IAM auth on publicly accessible MSK
package main
import (
"context"
"crypto/tls"
"crypto/x509"
"fmt"
"log"
"time"
import dag
def always_fail():
raise Exception('Manually throwing')
processes = {
"root": lambda: print("root"),
"a": lambda: print("A"),
@krsoninikhil
krsoninikhil / bing-ads-stats-to-google-sheet.js
Created September 17, 2020 18:00
Bing Ads Script To Push Campaign Stats To Google Spreadsheet
function main() {
var payload = {"channel": "bing", "reports": []};
var date = new Date();
date.setDate(date.getDate() - 1);
var yesterday = date.toISOString().split('T')[0];
var rows = AdsApp.campaigns().forDateRange('YESTERDAY').withCondition('Impressions > 0').get();
while (rows.hasNext()) {
var campain = rows.next()
var row = campain.getStats();
@krsoninikhil
krsoninikhil / flag19.txt
Last active January 13, 2019 18:31
flag19
a:3:{i:0;s:4:"Math";i:1;s:8:"Language";i:2;s:7:"Science";}
@krsoninikhil
krsoninikhil / README.md
Last active May 5, 2016 13:36
Random MAC address generator

Example

  • To generate dataset: bash random-mac.sh 10

  • To search by device id: bash random-mac.sh -s 8

  • Replace the file name with the actual path to the file.

  • Replace replace 10 with actual number of devices.

  • Repalce 8 with the device id to be searched.

The result will be saved in dataset.csv file.

@krsoninikhil
krsoninikhil / Gemfile
Last active February 20, 2016 21:48
It will post on Facebook about the new companies opened to your branch for internship on Channeli. Needs IITR intranet.
source 'http://rubygems.org'
ruby "2.2.3"
# following gems are required in the main script.
gem "koala", "~> 2.2"
gem "httparty"
gem "nokogiri"