Skip to content

Instantly share code, notes, and snippets.

@caicaicai
caicaicai / UDPSocket.cs
Created March 12, 2023 09:14 — forked from louis-e/UDPSocket.cs
Simple C# UDP server/client in 62 lines
using System;
using System.Net;
using System.Net.Sockets;
using System.Text;
namespace UDP
{
public class UDPSocket
{
public Socket _socket;
@caicaicai
caicaicai / github-to-bitbucket
Created July 19, 2018 10:25 — forked from sangeeths/github-to-bitbucket
Forking a Github repo to Bitbucket
Go to Bitbucket and create a new repository (its better to have an empty repo)
git clone git@bitbucket.org:abc/myforkedrepo.git
cd myforkedrepo
Now add Github repo as a new remote in Bitbucket called "sync"
git remote add sync git@github.com:def/originalrepo.git
Verify what are the remotes currently being setup for "myforkedrepo". This following command should show "fetch" and "push" for two remotes i.e. "origin" and "sync"
git remote -v
@caicaicai
caicaicai / file
Last active March 22, 2017 05:28
freedom_public
{"0.9683889455105783":"-----BEGIN PGP PUBLIC KEY BLOCK-----\r\nCharset: UTF-8\r\n\r\nxv8AAABSBAAAAAATCCqGSM49AwEHAgMEMQNXf0WOlplMklc6IEKc6Fq2Q5crPu89\r\npgrGYcrOIBpeFUxEozQpfOqrhRSClXDj17BqtUEv92s4e9HTKELKOc3/AAAACDxn\r\naXRodWI+wv8AAACOBBATCABA/wAAAAWCWNIIuP8AAAACiwn/AAAACZDUV75IaMYJ\r\nBv8AAAAFlQgJCgv/AAAABJYDAQL/AAAAApsD/wAAAAKeAQAAD+IA/3+yjZOhliaO\r\nuxBIk+wcGtCUIbIs80NUqLcgzS/WwDq0AQCAB4yRRaqa9ul+bs0MQOQx6TuVtTpF\r\n7/izNt+emrX3hc7/AAAAVgQAAAAAEggqhkjOPQMBBwIDBBtASrjtxH7enqtfiscV\r\nKqZZ/2T5ixTxEcZ1OQOr9V6sBiSL1dvJ/jt4dcl4cHNmxpBz0jvZOQU3PwvYq5oX\r\n7hUDAQgHwv8AAABtBBgTCAAf/wAAAAWCWNIIuP8AAAAJkNRXvkhoxgkG/wAAAAKb\r\nDAAAHiAA/A0eQLi48SYZ+rBvIhGYpp9T5WRfpOgPTjN5rphHpcy1AQCcwbpwsPnd\r\n8v9T247e6bT4m5Lk+RKZZgCgfHy3ut57OA==\r\n=LMuv\r\n-----END PGP PUBLIC KEY BLOCK-----\r\n","0.35162588259174976":"-----BEGIN PGP PUBLIC KEY BLOCK-----\r\nCharset: UTF-8\r\n\r\nxv8AAABSBAAAAAATCCqGSM49AwEHAgMEMQNXf0WOlplMklc6IEKc6Fq2Q5crPu89\r\npgrGYcrOIBpeFUxEozQpfOqrhRSClXDj17BqtUEv92s4e9HTKELKOc3/AAAACDxn\r\naXRodWI+wv8AAACOB
#!/bin/bash
#shows traffic on the specified device
function human_readable {
VALUE=$1
BIGGIFIERS=( B K M G )
CURRENT_BIGGIFIER=0
while [ $VALUE -gt 10000 ] ;do
VALUE=$(($VALUE/1000))
<?php
/**
* An helper file for Laravel 4, to provide autocomplete information to your IDE
* Generated with https://github.com/barryvdh/laravel-ide-helper
* Updated for Laravel 4.1.20 (2014-02-03)
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
*/
exit('Only to be used as an helper for your IDE');