Skip to content

Instantly share code, notes, and snippets.

Hi.. Don't hesitate to ping me.. I would love an interesting chat about tech.

Ashwani Kumar TheAshwanik

Hi.. Don't hesitate to ping me.. I would love an interesting chat about tech.
View GitHub Profile
# Encode inputfile.tar.gz as a series of video frames
# Frames are written to frames/frameNNNN.png
from PIL import Image
with open('inputfile.tar.gz', 'rb') as f:
data =
WIDTH = 120
TheAshwanik / breachcompilation.txt
Created Sep 25, 2020
1.4 billion password breach compilation wordlist
View breachcompilation.txt
wordlist created from original 41G stash via:
grep -rohP '(?<=:).*$' | uniq > breachcompilation.txt
Then, compressed with:
7z a breachcompilation.txt.7z breachcompilation.txt
TheAshwanik / Delete Project on Glitch
Last active May 9, 2021
Delete Project on Glitch
View Delete Project on Glitch
While you cannot delete the project itself yet, but you can delete the source code in your project by overwriting the glitch git repository with an empty new commit. This is very important if you just planned to play around but ended up writing important code onto glitch and have a fear of getting hacked and your code getting compromised and published on the internet, or if you accidentally commited a private key to glitch and wanted to completely remove it.
on glitch website project edit page open Tools/Extras/Git,Import&Export/Write
Copy_link => is e.g.
Copy_user_name => is YOUR-RANDOMLY-GENERATED-GIT-USERNAME e.g. 1aaa1111-1111-aaa1-aa1111111111
on glitch website project edit page open Console(terminal)
git config receive.denyCurrentBranch updateInstead
on your local computer terminal
mkdir foobar
cd foobar
TheAshwanik / Open VPN with LetsEncrypt certificate
Created Jun 26, 2020
Open VPN with LetsEncrypt certificate
View Open VPN with LetsEncrypt certificate
sudo certbot renew --dry-run ( use --verbose if you want )
sudo service openvpnas start ( or sudo ./sacli start )
sudo service openvpnas stop ( or sudo ./sacli stop )
TheAshwanik / first_run.ini
Created Jun 26, 2020 — forked from HighMacGuy/first_run.ini
OpenVPN Access Server Letsencrypt
View first_run.ini
# OpenVPN Let's Encrypt first run config file
authenticator = standalone
standalone-supported-challenges = tls-sni-01
non-interactive = True
rsa-key-size = 4096
email = ""
domains = ""
View FreeRadius.html
Install and configure freeradius to use mariadb database (also for managing freeradius, we install daloRADIUS web interface).
1- Install and setup mariadb
To install mariadb, we create mariadb repository file and install required packages. here we install mariadb 10.5:
# vim /etc/yum.repos.d/mariadb.repo
then put the following content in it:

Rails Generating & Scaffolding

Rails' use of strict naming conventions means a lot of core code SHOULD be in the same format whoever writes it? It could be written by a friend, colleague or a computer... it shouldn't matter because the same Rails rules apply to everyone.

This means that Rails can actually do some tasks for you! It can actually build things and write code on your behalf...

Coming from another language like PHP, this can seem like magic.

TheAshwanik /
Created Dec 25, 2019 — forked from keithweaver/
Point Domain to Amazon Web Services (AWS) EC2 Instance

Point Domain to Amazon Web Services (AWS) EC2 Instance

  1. Open the Amazon Route 53 console at
  2. If you are new to Amazon Route 53, you see a welcome page; choose Get Started Now for DNS Management. Otherwise, choose Hosted Zones in the navigation pane.
  3. Choose Create Hosted Zone.
  4. For Domain Name, type your domain name.
  5. Choose Create.
  6. Click the Hosted Zone, edit record set.
  7. In the value, add
  8. Change your DNS file to point to the IPv4 address (This would be in something like GoDaddy).
View Git Commands
99% of the Git commands you'll need at work, demonstrated in a single script (
# contents
TheAshwanik /
Created Mar 31, 2019 — forked from dreikanter/
File encryption using OpenSSL

Symmetic encryption

For symmetic encryption, you can use the following:

To encrypt:

openssl aes-256-cbc -salt -a -e -in plaintext.txt -out encrypted.txt

To decrypt: