Skip to content

Instantly share code, notes, and snippets.

View zxcfer's full-sized avatar
🎯
Focusing

Fernando Vásquez zxcfer

🎯
Focusing
View GitHub Profile
@zxcfer
zxcfer / go
Created November 20, 2023 13:29
Get quotes API
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
@zxcfer
zxcfer / python request module
Created September 28, 2021 11:54
GIST created by python code
Python requests has 3 parameters: 1)Request URL
2)Header Fields
3)Parameter
4)Request body
@zxcfer
zxcfer / React Context.js
Last active May 15, 2020 14:44
React Context
import React from 'react';
import ReactDOM from 'react-dom'
import './App.css'
// creación de contexto
const Context = React.createContext();
// creación de Provider
function AppProvider(props) {
const [contador, setContador] = React.useState(0)
@zxcfer
zxcfer / Contador Redux.js
Last active May 15, 2020 14:44
Contador Redux
import React from 'react';
import logo from './logo.svg';
import './App.css';
import { Provider, useSelector, useDispatch } from 'react-redux'
import { createStore } from 'redux'
const rootReducer = (state = {count: 0}, action) => {
switch(action.type) {
case 'INCREMENTAR_CONTADOR':
@zxcfer
zxcfer / date_util.erl
Created August 20, 2012 17:34 — forked from zaphar/date_util.erl
Erlang set of utility functions that wrap the calendar module and now() date() and time() functions
-module(date_util).
-compile(export_all).
epoch() ->
now_to_seconds(now())
.
epoch_hires() ->
now_to_seconds_hires(now())
.