Skip to content

Instantly share code, notes, and snippets.

View tarekbadrshalaan's full-sized avatar
🎯
Focusing

Tarek Badr tarekbadrshalaan

🎯
Focusing
View GitHub Profile
@tarekbadrshalaan
tarekbadrshalaan / combine_text_files.py
Created April 20, 2023 18:48
This script combines all text files in a specified directory and writes their contents to a single text file, with an option to also create a PDF file.
"""
Combine Text Files Script
This script combines all text files in a specified directory and writes their contents to a single text file,
with an option to also create a PDF file.
How to use:
1. Ensure you have the `reportlab` library installed. If not, install it with the following command:
pip install reportlab
@tarekbadrshalaan
tarekbadrshalaan / mergeTwLists.go
Last active July 4, 2021 19:19
Merge two Twitter lists using twitter-api
package main
import (
"fmt"
"net/url"
"github.com/tarekbadrshalaan/anaconda"
)
func main() {

REF.Stack-Overflow

C code main.c

#include <stdlib.h>

int main() {
    char* string = malloc(5 * sizeof(char)); //LEAK: not freed!
@tarekbadrshalaan
tarekbadrshalaan / go_context.go
Last active February 28, 2020 20:09
go context example
// ref: http://p.agnihotry.com/post/understanding_the_context_package_in_golang
// ref: https://github.com/pagnihotry/golang_samples/blob/master/go_context_sample.go
// ref: https://play.golang.org/p/grQAUN3MBlg
// ref: https://play.golang.org/p/NQBpTvigNUA
package main
import (
"context"
"fmt"
"math/rand"
@tarekbadrshalaan
tarekbadrshalaan / Use_go-ipfs-http-client.go
Created June 1, 2019 10:35
this Gist about using new ipfs http client (go-ipfs-http-client)
package main
import (
"context"
"fmt"
httpapi "github.com/ipfs/go-ipfs-http-client"
path "github.com/ipfs/interface-go-ipfs-core/path"
)
@tarekbadrshalaan
tarekbadrshalaan / Hello_World.py
Created July 17, 2018 20:59
how to print hello world in python
print("Hello World")