Skip to content

Instantly share code, notes, and snippets.

View musantro's full-sized avatar

Antonio Rodríguez musantro

View GitHub Profile
@cocodrino
cocodrino / file.jsx
Created October 17, 2022 14:47
wesocket react
export const WebsocketContext = createContext(false, null, () => {});
// ready, value, send
// Make sure to put WebsocketProvider higher up in
// the component tree than any consumers.
export const WebsocketProvider = ({ children }) => {
const [isReady, setIsReady] = useState(false);
const [val, setVal] = useState(null);
const ws = useRef(null);
@fardjad
fardjad / how-to-install-homebrew-on-manjaro.md
Last active September 17, 2024 19:24
[How to Install Homebrew on Manjaro] Steps required to install homebrew on Manjaro Linux #linux #manjaro #homebrew

How to Install Homebrew on Manjaro

Steps

  1. Install base-devel

     pacman -Syu # CAUTION: this updates the whole system
     pacman -S base-devel
    
  2. Run the installer script

@PotOfCoffee2Go
PotOfCoffee2Go / git-daemon-anon.md
Last active September 4, 2020 09:39
Setup git daemon allowing anonymous clone and push behind a firewall

Git server behind a firewall

It is handy to be able to quickly create a git repo server with anonymous clone and push access rights.
Note: Anyone!! with access to the server will be able to clone and push to the repo
Is super handy for personal use, in-house networks, or networks behind a firewall where security is less of an issue.

Server side

Create common repo directory

Create the server git directory
Create a test repo
Bring up the git server daemon

@sio2boss
sio2boss / client-socket-reconnect.js
Created August 25, 2013 14:19
Node.js Re-connecting Socket
//
// Simple example of using net.Socket but here we capture the
// right events and attempt to re-establish the connection when
// is is closed either because of an error establishing a
// connection or when the server closes the connection.
//
// Requires
var net = require('net');