Skip to content

Instantly share code, notes, and snippets.

@nilsandrey
nilsandrey / react-useTimeout.hook.js
Last active May 2, 2024 02:52
React useTimeout hook (by Chris Bongers)
// From <https://dev.to/dailydevtips1/react-cleaner-use-of-settimeout-105m>
import { useCallback, useEffect, useRef, useMemo } from 'react';
/**
* To use the hook
* ```
* import useTimeout from './useTimeout';
*
* const [timeout] = useTimeout(() => {
* setShow(false);
@nilsandrey
nilsandrey / atcb-adapter.scss
Created September 16, 2022 02:26
Archivo para personalizar el export to calendar
body {
@media (max-width: 900px) {
div.atcb_list {
width: 100% !important;
left: 0 !important;
border-radius: 0 !important;
bottom: 0 !important;
top: unset !important;
div.atcb_list_item {
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"segments": [
{
"leading_diamond": "\ue0b6",
"background": "#4da0e0",
"foreground": "#ffffff",
@rnovec
rnovec / chapter-2.md
Last active May 2, 2024 02:51
Microprocesadores Intel. CAPÍTULO 2 - El microprocesador y su arquitectura

Microprocesadores Intel -

8086/8088, 80186/80188, 80286, 80386, 80486, Pentium, Procesador Pentium Pro, Pentium II, Pentium III, Pentium 4

Arquitectura, Programación e Interfaz

CAPÍTULO 2 - El microprocesador y su arquitectura

Resumen

@DianaEromosele
DianaEromosele / Change "origin" of your GIT repository
Created August 7, 2016 00:31
Change "origin" of your GIT repository
$ git remote rm origin
$ git remote add origin git@github.com:aplikacjainfo/proj1.git
$ git config master.remote origin
$ git config master.merge refs/heads/master
@dmwyatt
dmwyatt / render.schema.json
Created May 7, 2023 19:20
A start at a render.yaml json schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"services": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {"type": "string"},
import ast
import astor
import tkinter as tk
from tkinter import scrolledtext, IntVar, Checkbutton
class EllipsisTransformer(ast.NodeTransformer):
def __init__(self, remove_args, remove_methods):
self.remove_args = remove_args
self.remove_methods = remove_methods
{
"manifest_version": 3,
"name": "Superpower ChatGPT",
"version": "5.1.2",
"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzG6ZR+j3lpHF0XrDLIXdrk25idObfq+RK7WM+pIaQmDO2nM5Y+SZJJbFwyxjWX+3V6XOgS5v9Lpnqg46OJ/W9Q5i23Usx1MXgaJBTlEFz0XG+PYK6BElhc9itS7m6oCLknin97a533tusXmm8zW7kaDGy8vycMDY6Ffbqa3sn0PqZ8bXUlAjgO91dQcB8EtlT906hwhZjtfEYvp2hdxYkRFxfuaR1WMLkxttVXv506RXJowxq0LO3aqj83QeJoXkQF1wbzCxYO1VpVGEmYIQxIKw/csusZNZs8gwJrIWtOzhMgDNOFzXNeZl0ASgoj2M9UsZp+Dunn57VT8tQyaE6QIDAQAB",
"description": "ChatGPT with superpowers! Sync/search history locally, create folders, export all chats, pin messages, access thousands of prompts",
"icons": {
"16": "images/icon-16.png",
"32": "images/icon-32.png",
"48": "images/icon-48.png",
@phuesler
phuesler / netcat_tcp_server.sh
Last active May 2, 2024 02:48
Simple tcp server using netcat
#!/bin/bash
# Simple tcp server using netcat
# - depending on the netcat version either use nc -l 5555 or nc -l -p 5555
# - verify with `telnet locahhost 5555`
# - quit the telnet with `ctrl-]` and then type quit
# - the while loop is there so reopen the port after a client has disconnected
# - supports only one client at a time
PORT=5555;
while :; do nc -l -p $PORT | tee output.log; sleep 1; done
@dmwyatt
dmwyatt / remove_chrome_other_search_engines.js
Last active May 2, 2024 02:48
[Remove chrome "other search engines"] #chrome
// 1. open chrome://settings/searchEngines
// 2. press Ctrl-Shift-J to open console
// 3. paste the following code
// note: you may have to run it multiple times to get rid of all of them
// If you have search engines you want to use add the text "(KEEP)" to their name
// and by name i mean the "Search engine" field when you add/edit one of the search engines
settings.SearchEnginesBrowserProxyImpl.prototype.getSearchEnginesList()
.then(function (val) {