Skip to content

Instantly share code, notes, and snippets.

View Devwarlt's full-sized avatar
🎮

Nádio Pontes Devwarlt

🎮
View GitHub Profile
@darkguy2008
darkguy2008 / UDPSocket.cs
Last active July 10, 2024 09:13
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);
@istupakov
istupakov / ShuntingYardParser.cs
Created September 29, 2016 18:39
C# realization of Shunting-yard algorithm
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
namespace ShuntingYardParser
{
enum TokenType { Number, Variable, Function, Parenthesis, Operator, Comma, WhiteSpace };
@Devwarlt
Devwarlt / commands.md
Last active May 5, 2021 13:58
Useful Git commands

Commands

  • change default remote HEAD branch: git remote set-head origin <branch>
  • show local branches: git branch
  • show all branches (even deleted): git branch --all
  • delete local branch: git branch -d <branch>
  • delete remote branch: git push origin --delete <branch> or git push origin :<branch>
  • get git commits: git reflog
  • change git name: git config --global user.name "<name>"
  • change git email: git config --global user.email "<email>"
  • show all branchs (including local): git branch -a
@Devwarlt
Devwarlt / load_balancer.py
Last active August 16, 2021 20:49
A load balancer algorithm for thread balancing in order to avoid overwhelming processing and CPU exhaustion.
# Author: Devwarlt
# Date: 14 Aug 2021
#
# About this algorithm:
# A load balancer algorithm for thread balancing in order to avoid
# overwhelming processing and CPU exhaustion.
#
from typing import (
Callable, Iterable, Any,