Skip to content

Instantly share code, notes, and snippets.

View danielsouzaaf's full-sized avatar

Daniel Souza danielsouzaaf

View GitHub Profile
@danielsouzaaf
danielsouzaaf / publish-ghpages.md
Created October 14, 2019 04:47 — forked from tduarte/publish-ghpages.md
If you need to force push an subtree
git checkout master # you can avoid this line if you are in master...
git subtree split --prefix dist -b gh-pages # create a local gh-pages branch containing the splitted output folder
git push -f origin gh-pages:gh-pages # force the push of the gh-pages branch to the remote gh-pages branch at origin
git branch -D gh-pages # delete the local gh-pages because you will need it: ref
@danielsouzaaf
danielsouzaaf / UDPSocket.cs
Created August 29, 2019 13:17 — forked from darkguy2008/UDPSocket.cs
Simple C# UDP server/client in 56 lines
using System;
using System.Net;
using System.Net.Sockets;
using System.Text;
namespace UDP
{
public class UDPSocket
{
private Socket _socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);