Skip to content

Instantly share code, notes, and snippets.

View asahasrabuddhe's full-sized avatar
:octocat:
Chillin'

Ajitem Sahasrabuddhe asahasrabuddhe

:octocat:
Chillin'
View GitHub Profile
@asahasrabuddhe
asahasrabuddhe / boost.js
Created May 30, 2023 08:36
Arc Boost for GitHub (Copy Monday Button)
// This script injects an element at the top of the page.
// It doesn't work yet. To make it work, handle the TODO.
const button = {
name: 'Copy for Monday',
id: 'copyForMonday',
classList: [
'flex-md-order-2', 'Button--secondary', 'Button--small', 'Button', 'm-0', 'mr-md-0'
],
onclick: () => {
version: '3'
services:
user:
image: ajitemsahasrabuddhe/mirror:latest
ports:
- 9090:9090
environment:
NAME: 'user-service'
labels:
@asahasrabuddhe
asahasrabuddhe / azhar.php
Created February 9, 2020 16:55
Challenge
<?php
/* Comment */
/* Comment */
/* Comment */
/* Comment */
/* Comment */
/* Comment */
/* Comment */
/* Comment */
/* Comment */
@asahasrabuddhe
asahasrabuddhe / keybase.md
Created September 13, 2019 11:35
Keybase Proof

Keybase proof

I hereby claim:

  • I am asahasrabuddhe on github.
  • I am ajitem (https://keybase.io/ajitem) on keybase.
  • I have a public key ASCzLp0B_5dJy2k3unuvqHxUvIDzkguiOK6FYBttp-HGTQo

To claim this, I am signing this object:

@asahasrabuddhe
asahasrabuddhe / crypt.go
Created August 19, 2019 03:48
encrypt decrypt
package main
import (
"crypto/aes"
"crypto/cipher"
"crypto/sha256"
"encoding/base64"
"encoding/hex"
"fmt"
)
@asahasrabuddhe
asahasrabuddhe / crypt.php
Last active August 19, 2019 03:47
encrypt and decrypt
<?php
class MBM_Encrypt_Decrypt {
const ENCRYPT_METHOD = 'AES-256-CBC'; // type of encryption
const SECRET_KEY = 'rappier_simple_secret_key'; // secret key
const SECRET_IV = 'rappier_simple_secret_iv'; // secret iv
public function encrypt($string) {
return $this->encrypt_decrypt('encrypt', $string);
}
@asahasrabuddhe
asahasrabuddhe / config-init.sh
Created August 14, 2019 05:41
Sync DOTFILES using Git
git init --bare $HOME/.configs
alias config='/usr/bin/git --git-dir=$HOME/.configs/ --work-tree=$HOME'
config config --local status.showUntrackedFiles no
echo "alias config='/usr/bin/git --git-dir=$HOME/.configs/ --work-tree=$HOME'" >> $HOME/.zshrc
@asahasrabuddhe
asahasrabuddhe / mirrorupgrade.hook
Created August 14, 2019 05:40
Pacman Mirror List Upgrade Hook
[Trigger]
Type = Package
Operation = Install
Operation = Upgrade
Target = pacman-mirrorlist
[Action]
Description = Updating mirrorlist...
When = PostTransaction
Depends = reflector
@asahasrabuddhe
asahasrabuddhe / 20-displaylink.conf
Created August 14, 2019 03:50
DisplayLink Configuration for Intel + Xorg
@asahasrabuddhe
asahasrabuddhe / benchmark.sh
Last active March 28, 2019 10:09
Run Sysbench Benchmark
#!/bin/sh
csv_file=`echo sysbench-output.log | sed s/\.log\.txt//`
csv_file=$csv_file.csv
echo $csv_file
echo "" >> ${csv_file}
echo "Threads, Total events, Time, Events per second" >> ${csv_file}
echo "" >> $csv_file
syslog_file_name=op.log
for ((i = 1; i <= $(nproc); i = i * 2)); do
sysbench --test=cpu --cpu-max-prime=20000 --num-threads=$i run > op.log