Skip to content

Instantly share code, notes, and snippets.

View edco29's full-sized avatar
🏠
Working from home

Edwin Contreras edco29

🏠
Working from home
View GitHub Profile
@skdubey
skdubey / del_branch.sh
Created July 28, 2020 04:17
This script will pull all the branches from your Bitbucket repository of all the projects and their repositories, find the merged branches older than 30 days and delete it.
#!/bin/bash
## Get the list of all the projects from Bitbucket account across all the pages
get_total_project_list () {
start=0
total_project_list=()
is_last_page=false
while ! $is_last_page
do
response=$(curl -k -u $u -X GET -H "Content-type: application/json" $bitbucket_url/rest/api/1.0/projects?start=$start) 2>&1
var credential = "YOUR-APP-CONFIGURATION-CREDENTIAL-ID";
var secret = "YOUR-APP-CONFIGURATION-CREDENTIAL-VALUE";
function signRequest(host,
method, // GET, PUT, POST, DELETE
url, // path+query
body, // request body (undefined of none)
credential, // access key id
secret) // access key value (base64 encoded)
{
@Khoulaiz
Khoulaiz / gist:41b387883a208d6e914b
Last active May 3, 2024 15:57
Checking ports without telnet

Here are several different ways to test a TCP port without telnet.

$ cat < /dev/tcp/127.0.0.1/22
SSH-2.0-OpenSSH_5.3
^C

$ cat &lt; /dev/tcp/127.0.0.1/23
@gmic
gmic / ruby proxy
Created January 4, 2012 13:00
Ruby: install gems behind a proxy
gem install --http-proxy http://user:password@some.proxy.com:8080 bundler