Skip to content

Instantly share code, notes, and snippets.

View Abhinickz's full-sized avatar
💻
Full Stack Developer

Abhishek Bhasker Abhinickz

💻
Full Stack Developer
View GitHub Profile
@Abhinickz
Abhinickz / win10_binary_fission.md
Created January 24, 2023 02:08 — forked from dragon788/win10_binary_fission.md
Making the Windows 10 "chubby" install.wim compatible with a FAT32 USB so a UEFI bootable USB can be created from Linux/macOS/ChromeOS

MAGIC aka Making Anything Gruelingly "Impossible" Coherent

Whatever operating system you are using to create the USB, you will need to have a Windows 10 ISO, either from Microsoft or your system manufacturer and have a USB drive 8GB or larger (or one with at least 5GB of free space and using the FAT32 filesystem, but using a fresh and empty one is best).

TL;DR

#macOS/Linux
# First try the `bootiso` program, it has options for splitting the WIM for you!
# https://jsamr.github.io/bootiso/
# You need to already have 7zip aka `p7zip` on macOS and Linux, and `wimlib` macOS via `brew` or `wimtools` on Linux
CREATE TABLE public.test (
id SERIAL,
username varchar NULL,
name varchar NULL
);
INSERT INTO public.test (username, name)
VALUES
('Abhinickz','OWNER'),
('Abhasker','EMPLOYEE'),

Keybase proof

I hereby claim:

  • I am abhinickz on github.
  • I am abhinickz (https://keybase.io/abhinickz) on keybase.
  • I have a public key ASCH9AfNUviA7T8ISy84Y7W47Xw8Y2sWYHsRaZLmk0W4nAo

To claim this, I am signing this object:

echo "GET http://google.com" | vegeta attack -duration=5s -rate=2 -cert=/path/to/certificate.pem | tee results.bin | vegeta report
cat results.bin | vegeta plot > plot.html
@Abhinickz
Abhinickz / sudo_expect.pl
Created September 19, 2018 06:40
Sudo start process: when password is required
#!/usr/bin/perl
use strict; use warnings; use Data::Dumper;
use Expect;
my $expect = Expect->new;
my $command = 'sudo service ssh start';
my $timeout = 500;
my $password = "password";
$expect->raw_pty(1);
@Abhinickz
Abhinickz / git-change-commit-messages.md
Created June 21, 2018 20:57 — forked from nepsilon/git-change-commit-messages.md
How to change your commit messages in Git? — First published in fullweb.io issue #55

How to change your commit messages in Git?

At some point you’ll find yourself in a situation where you need edit a commit message. That commit might already be pushed or not, be the most recent or burried below 10 other commits, but fear not, git has your back 🙂.

Not pushed + most recent commit:

git commit --amend

This will open your $EDITOR and let you change the message. Continue with your usual git push origin master.

@Abhinickz
Abhinickz / sigtrap.pl
Created April 20, 2018 09:58
Perl sigtrap to capture signal, print and exit.
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
use sigtrap qw(handler signal_handler normal-signals);
my $time = 0;
while(1){
@Abhinickz
Abhinickz / async_example_AnyEvent.pl
Created March 17, 2018 07:53
Perl Async Example: Use AnyEvent to run two separate code simultaneously in while (1) condition.
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
use AnyEvent;
my $count = {
cache => 0,
main_loop => 0,
};

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@Abhinickz
Abhinickz / convert id_rsa to pem
Created May 24, 2017 19:48 — forked from mingfang/convert id_rsa to pem
Convert id_rsa to pem file
openssl rsa -in ~/.ssh/id_rsa -outform pem > id_rsa.pem
chmod 700 id_rsa.pem