Skip to content

Instantly share code, notes, and snippets.

View fanbyprinciple's full-sized avatar
🙀
Out on an adventure !

Ashwin Jayaprakash fanbyprinciple

🙀
Out on an adventure !
View GitHub Profile
@fanbyprinciple
fanbyprinciple / index.html
Created February 4, 2024 15:11
Love gif idea
<p id="q" class="question">Will you be my valentine, Devu ?</p>
<div class="button-container">
<img id="panda" src="https://media.tenor.com/LxTbPto0fdoAAAAM/bubu-rose-bubu-sweet.gif">
<div class="button-container">
<button id="yesButton" class="btn">Yes</button>
<button id="noButton" class="btn btn-no">No</button>
</div>
</div>
@fanbyprinciple
fanbyprinciple / mudit.sol
Created December 6, 2023 14:39
mudmdumud
contracts/MyDAO.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
contract MyDAO {
mapping(address => uint256) private _balances;
mapping(address => bool) private _hasInitialized;
uint256 public specialTokens = 6000;
uint256 public nextProposalId;
mapping(uint256 => Proposal) public proposals;
@fanbyprinciple
fanbyprinciple / undo_git.md
Last active January 18, 2023 05:15
How to undo a commit on github

Reset it to previous commit -

git reset --hard HEAD^

Force a push -

git push --force

@fanbyprinciple
fanbyprinciple / invoke_mim_win10.ps1
Created August 12, 2022 05:20
invoke-mimikatz powershell that works for latest win 10
This file has been truncated, but you can view the full file.
function Invoke-Mimikatz
{
[CmdletBinding(DefaultParameterSetName="DumpCreds")]
Param(
[Parameter(Position = 0)]
[String[]]
$ComputerName,
[Parameter(ParameterSetName = "DumpCreds", Position = 1)]
[Switch]
@fanbyprinciple
fanbyprinciple / rlotto_htb_solution.py
Last active July 7, 2022 09:42
RLotto htb solution
# from https://medium.com/@wiiz4rd/hackthebox-rlotto-challenge-68f4b01006ba
# connect to rlotto using nc or telnet
# get the first sequence of numbers
# input into this program
import time
import random
seed = int(input("Enter the timestamp (enter 0 if not aware) :"))
@fanbyprinciple
fanbyprinciple / whatsapp bot with hugging face.py
Created February 17, 2022 02:08
Creating a whatsapp bot with selenium and hugging face traansformers.
# PYTHON Example
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
from selenium.webdriver import ActionChains
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.common.keys import Keys
import time
@fanbyprinciple
fanbyprinciple / get_hash.py
Created February 15, 2022 11:45
getting file md5 hashes and sha1 hashes
import os
import hashlib
import sys
import pandas as pd
import numpy as np
all_files = []
all_files_without_path = []
all_hashes = []
@fanbyprinciple
fanbyprinciple / main.rs
Created January 23, 2022 06:41
madlib generator
fn main() {
let color = std::env::args().nth(1).expect("Please provide a color");
let animal = std::env::args().nth(2).expect("Please provide an animal");
let friend = std::env::args().nth(3).expect("Please provide a friend's name");
println!("Roses can be {}, {} could be blue, {} is open minded and so should be you.", color, animal, friend);
}
@fanbyprinciple
fanbyprinciple / creating a reddit bot.py
Last active January 19, 2022 18:25
creating a reddit bot.py
## importing all the required libraries
import praw
import os
import re
## initialising praw
reddit = praw.Reddit('brevity_bot')
subreddit = reddit.subreddit("botjungle")
@fanbyprinciple
fanbyprinciple / gist:0abc32544a5fa3699bf024118e4a0bc1
Last active January 19, 2022 17:27
praw_ini_sample_file.txt
[DEFAULT]
# A boolean to indicate whether or not to check for package updates.
check_for_updates=True
# Object to kind mappings
comment_kind=t1
message_kind=t4
redditor_kind=t2
submission_kind=t3
subreddit_kind=t5