Skip to content

Instantly share code, notes, and snippets.

@kensaaa
kensaaa / redshift.conf
Created June 10, 2022 17:58
file config: redshift , ubicacion: ~/.config/redshift
[redshift]
temp-day=5800
temp-night=2400
transition=0
gamma=0.8
location-provider=manual
[manual]
lat=-33.5
lon=-70.5
[randr]
@kensaaa
kensaaa / kitty.conf
Created June 10, 2022 17:56
file configurator: kitty terminal , ubicacion: ~/.config/kitty/kitty.conf
font_family Caskaydia Cove Nerd Font
font_size 12.0
background_opacity .8
remember_window_size no
initial_window_width 640
initial_window_height 350
cursor_shape beam
cursor_beam_thickness 1.8
@kensaaa
kensaaa / CounterReducer.tsx
Created June 10, 2022 15:13
React: example reducer typescript
import {useReducer, useState} from "react"
interface CounterState {
counter: number
previus: number
changes: number
}
const INITIAL_STATE:CounterState = {
@kensaaa
kensaaa / assets.d.ts
Created June 3, 2022 19:55
React: .d.ts para que no de error al agregar una imagen
declare module '*.jpg' {
const content: any; // you can also set this to string
export default content;
}
@kensaaa
kensaaa / useForm.js
Last active May 22, 2022 15:15
React: Custom hook form
import {useState} from "react"
export const useForm = (initialState = {}) => {
const [values,setValues] = useState(initialState)
const reset = () => {
setValues(initialState)
}