Skip to content

Instantly share code, notes, and snippets.

View akhilkailas017's full-sized avatar
💻

Akhil Kailas akhilkailas017

💻
View GitHub Profile
@akhilkailas017
akhilkailas017 / Base64Decrypt.py
Created February 8, 2025 02:31
used to decrypt base64 files
import os
import codecs
import base64
def list_encoded_files():
"""Lists all .b64 files in the current directory with decoded names."""
files = [f for f in os.listdir() if f.endswith(".b64")]
if not files:
print("No encoded files found.")
return []
@akhilkailas017
akhilkailas017 / Base64Encrypt.py
Created February 8, 2025 02:29
used to convert file to base64
import base64
import os
import codecs
def encode_file(file_path):
"""Encodes any file to base64 in chunks and saves it with an encrypted filename (without extension)."""
chunk_size = 64 * 1024 # 64 KB per chunk
# Split filename and extension
@akhilkailas017
akhilkailas017 / App.jsx
Last active January 12, 2025 08:43
Chat App Layout structure Template Tailwind css , React
function App() {
return (
<>
<div className="flex flex-col h-screen w-full">
<div className="h-[10vh] bg-violet-400 flex items-center justify-between px-4">
<p className="text-white text-lg font-bold">Chat Application</p>
<ul className="flex space-x-4">
<li className="text-white">About Me</li>
</ul>
</div>
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Nesciunt temporibus totam reiciendis amet, accusantium sed optio ducimus odio, veritatis praesentium sunt, dignissimos inventore laborum quas nisi assumenda debitis incidunt quibusdam.
leisure shock edit oval diesel recall act sunset sight snack toss cup
@akhilkailas017
akhilkailas017 / Browser Provider Version.txt
Created January 9, 2025 04:32
Brower provider version
The BrowserProvider was introduced in Ethers.js v6. This class simplifies interaction with Ethereum providers injected by browsers (like MetaMask) and replaces the use of ethers.providers.Web3Provider in earlier versions of Ethers.js.
If you're working with an older version of Ethers.js (v5), you'll need to use Web3Provider instead:
@akhilkailas017
akhilkailas017 / testing.ts
Last active January 6, 2025 07:44
testing sample
import { Client, expect } from '@loopback/testlab';
import { DatacallApplication } from '../..';
import { setupApplication, updateMongoEnv } from '../acceptance/test-helper';
import dayjs from 'dayjs';
import utc from 'dayjs/plugin/utc';
import * as sinon from 'sinon';
import { AWSCognito } from '../../util/aws/aws-cognito';
import { CustomerRepository } from '../../repositories';
import { FeedService } from '../../services';
dayjs.extend(utc);
@akhilkailas017
akhilkailas017 / PyInstaller-Windows.sh
Created December 11, 2024 16:18
PyInstaller Windows
pip install auto-py-to-exe
auto-py-to-exe
@akhilkailas017
akhilkailas017 / PyInstaller-Ubuntu.sh
Created December 11, 2024 16:16
PyInstaller Ubuntu
pip3 install pyinstaller
pyinstaller --onefile your_script.py
cd dist
chmod +x your_script
./your_script
@akhilkailas017
akhilkailas017 / Self Extract RAR.md
Created December 11, 2024 16:11
Self Deleting WINRAR SFX Archive

Enable "Create SFX archive" in WINRAR's General tab and add

"%comspec%" /c del "%sfxname%"

under "Run after extraction" in SFX options to make an archive self-delete after extraction.

@akhilkailas017
akhilkailas017 / FixPendrive.sh
Last active December 11, 2024 16:17
Fix Pendrive
diskpart
list disk
select disk <disk_number>
detail disk
clean