Skip to content

Instantly share code, notes, and snippets.

View aarani's full-sized avatar
☃️

Afshin Arani aarani

☃️
View GitHub Profile

Keybase proof

I hereby claim:

  • I am aarani on github.
  • I am afshinarani (https://keybase.io/afshinarani) on keybase.
  • I have a public key ASBjaVJiQiwc0S5oDXgFhmlMyyPeZy87LW7rFhwyUoRVyAo

To claim this, I am signing this object:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net;
using System.Net.Sockets;
using System.Threading;
using System.Collections;
using STUN.Attributes;
From 1fd2c9630aeec2abf571255e59716edc44edb101 Mon Sep 17 00:00:00 2001
From: Afshin Arani <afshinarani79@gmail.com>
Date: Sat, 7 Nov 2020 00:08:18 +0330
Subject: [PATCH] add an overload to throw exceptions instead of returning
errors
---
STUN/STUNClient.cs | 75 +++++++++++++++++++++++++++++++++++++++++--
STUN/STUNException.cs | 12 +++++++
2 files changed, 84 insertions(+), 3 deletions(-)
@aarani
aarani / tl-schema-108.json
Created April 3, 2020 07:12
Layer 108 of Telegram API
{"constructors":[{"id":"-1132882121","predicate":"boolFalse","params":[],"type":"Bool"},{"id":"-1720552011","predicate":"boolTrue","params":[],"type":"Bool"},{"id":"1072550713","predicate":"true","params":[],"type":"True"},{"id":"481674261","predicate":"vector","params":[],"type":"Vector t"},{"id":"-994444869","predicate":"error","params":[{"name":"code","type":"int"},{"name":"text","type":"string"}],"type":"Error"},{"id":"1450380236","predicate":"null","params":[],"type":"Null"},{"id":"2134579434","predicate":"inputPeerEmpty","params":[],"type":"InputPeer"},{"id":"2107670217","predicate":"inputPeerSelf","params":[],"type":"InputPeer"},{"id":"396093539","predicate":"inputPeerChat","params":[{"name":"chat_id","type":"int"}],"type":"InputPeer"},{"id":"-1182234929","predicate":"inputUserEmpty","params":[],"type":"InputUser"},{"id":"-138301121","predicate":"inputUserSelf","params":[],"type":"InputUser"},{"id":"-208488460","predicate":"inputPhoneContact","params":[{"name":"client_id","type":"long"},{"name":"phone"
@aarani
aarani / ABIParser.cs
Created September 6, 2019 19:22
ABI DNA Chromatogram File Parser for C#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
namespace ABIParser
{
public class ABIParser
{
@aarani
aarani / ABIParser.cs
Created September 6, 2019 19:22
ABI DNA Chromatogram File Parser for C#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
namespace ABIParser
{
public class ABIParser
{
{
"constructors": [
{
"id": "-1132882121",
"predicate": "boolFalse",
"params": [],
"type": "Bool"
},
{
"id": "-1720552011",
/*
* SAMSUNG universal5422 board device tree source
*
* Copyright (c) 2013 Samsung Electronics Co., Ltd.
* http://www.samsung.com
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
@aarani
aarani / binary_patcher.sh
Last active November 1, 2016 11:53
Binary Patcher for k3gxx Camera blobs :P
#!/bin/bash
CURRENT_DIR=$(dirname $(readlink -f $0))
CM_BASE_DIR=$CURRENT_DIR/../../../..
# replace_all <old> <new> <file>
# binary string replacement
function replace_all {
echo "Patching: $(basename $3)"
perl -pi -e "s/$1/$2/g" $3
@aarani
aarani / tl-schema-57.json
Created October 12, 2016 14:11
TL-Schema ( Layer 57 )
{
"constructors":[
{
"id":"-1132882121",
"predicate":"boolFalse",
"params":[
],
"type":"Bool"
},