Skip to content

Instantly share code, notes, and snippets.

View muhammednagy's full-sized avatar
😎
Working

Nagy Salem muhammednagy

😎
Working
View GitHub Profile
p "Hello, World2"
p "Hello, World"
0xEebc586b728db1eDC1CF476fC1c40bD970c8294B
0x5366fc68Ec44180E4a25b0Cd0E09A267D6Db3c71
0x5366fc68Ec44180E4a25b0Cd0E09A267D6Db3c71
@muhammednagy
muhammednagy / add-new-crypto-to-peatio.md
Last active October 18, 2024 09:13 — forked from brossi/add-new-crypto-to-peatio.md
Adding A New Cryptocurrency to Peatio

State: Draft
Based on the Peatio Stable branch


Coin Daemon

To the coin daemon's {coin}.conf file, include the -walletnotify command:

# Notify when receiving coins
@muhammednagy
muhammednagy / fasterdownloadwithwget.sh
Created March 31, 2017 19:37
download bunch of files quietly from a file
#!/bin/bash
LINKS=$1
LOG=$2
wget --input-file=$LINKS --output-file $LOG
# usage
# chmod +x fasterdownloadwithwget.sh
# ./fasterdownloadwithwget.sh links_file log_file
# go and have fun !
@muhammednagy
muhammednagy / assignment.erl
Created February 25, 2017 19:12
Week 1 assignment kent university functional programming in erlang
-module(assignment).
-export([perimeter/1,area/1,enclose/1,bits/1]).
perimeter({square,R}) ->
4 * R;
perimeter({triangle,A,B,C}) ->
A + B + C;
perimeter({circle,R}) ->
2 * math:pi() * R .
@muhammednagy
muhammednagy / bitcount.erl
Created February 24, 2017 23:27
count bits in erlang
-module(bitcount).
-export([bitcount/1]).
bitcount(V) ->
bitcount(V, 0).
bitcount(0, C) ->
C;
bitcount(V, C) ->
bitcount( (V band (V - 1)), (C + 1)).
@muhammednagy
muhammednagy / recursion.erl
Created February 24, 2017 19:38
Recursion in erlang (Fibonacci, factorial, n dimensions)
-module(recursion).
-export([fac/1,fib/1,cut/1]).
fac(0) ->
1;
fac(N) when N>0 ->
fac(N-1) * N;
fac(N) when N<0 ->
io:fwrite("Postieve number please", []).