Skip to content

Instantly share code, notes, and snippets.

View ARACOOOL's full-sized avatar
💭
I may be slow to respond.

Askar ARACOOOL

💭
I may be slow to respond.
  • Businessolver
  • Philadelphia, PA, US
View GitHub Profile
@ARACOOOL
ARACOOOL / proxy.go
Created May 14, 2023 00:09
proxy.go
package main
import (
"crypto/tls"
"fmt"
"io"
"log"
"net"
"net/http"
"time"
@ARACOOOL
ARACOOOL / generate-ssh-key.sh
Created September 19, 2018 13:19 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/mozilla_rsa
@ARACOOOL
ARACOOOL / postman_updater.sh
Created June 28, 2018 15:08
Postman updater allows you to update your Postman without a headache
#!/usr/bin/env bash
wget https://dl.pstmn.io/download/latest/linux64 -O postman.tar.gz
sudo tar -xzf postman.tar.gz -C /opt
rm postman.tar.gz
sudo rm /usr/bin/postman
sudo ln -s /opt/Postman/Postman /usr/bin/postman
echo "Postman updated!"
@ARACOOOL
ARACOOOL / downloader.php
Last active February 8, 2024 16:53
Download remote file with progress bar (PHP, curl)
#!/usr/bin/php
<?php
/**
* Usage:
* php downloader.php http://path.to/remote/file.ext /local/file/path
*
* Output:
* [############################################################################################### ] 96%
*/
@ARACOOOL
ARACOOOL / binarySearch.go
Created December 19, 2016 03:34
In computer science, binary search, also known as half-interval search or logarithmic search, is a search algorithm that finds the position of a target value within a sorted array
package binary
import (
"errors"
"sort"
)
// BinarySearch search binary
func BinarySearch(data []int, searchValue int) (int, error) {
firstIndex := 0