Skip to content

Instantly share code, notes, and snippets.

View pablodz's full-sized avatar
🤠
9.99x Engineer

Pablo pablodz

🤠
9.99x Engineer
View GitHub Profile
@StevenACoffman
StevenACoffman / goGetPrivate.md
Last active August 5, 2025 15:06 — forked from dmitshur/gist:6927554
How to `go get` private repos using SSH key auth instead of password auth.

Set GOPRIVATE to match your github organization

I keep fixing this up, but if it fails for you, check if these are better maintained https://tip.golang.org/cmd/go/#hdr-Configuration_for_downloading_non_public_code and https://golang.org/ref/mod#private-modules.

Cloning the repo using one of the below techniques should work correctly but you may still be getting an unrecognized import error.

As it stands for Go v1.13, I found in the doc that we should use the GOPRIVATE variable like so:

GOPRIVATE=github.com/ORGANISATION_OR_USER_NAME go get -u -f github.com/ORGANISATION_OR_USER_NAME/REPO_NAME

The 'go env -w' command (see 'go help env') can be used to set these variables for future go command invocations.

@akhiltalwar
akhiltalwar / index.html
Created March 4, 2019 20:27
Whatsapp-floating-button
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<a href="whatsapp://send?phone=14384766790" class="float" target="_blank">
<i class="fa fa-whatsapp my-float"></i>
</a>
@bthaman
bthaman / list_environment_variables.py
Last active January 31, 2024 17:32
Python script to list all environment variables, and split the 'path' variable
""" lists environment variables, and splits elements in path variable """
import os
for k, v in sorted(os.environ.items()):
print(k+':', v)
print('\n')
# list elements in path environment variable
[print(item) for item in os.environ['PATH'].split(';')]
@rsperl
rsperl / Makefile #snippet
Last active April 3, 2025 14:04
self-documenting makefile with colors
SHELL=/bin/bash
# to see all colors, run
# bash -c 'for c in {0..255}; do tput setaf $c; tput setaf $c | cat -v; echo =$c; done'
# the first 15 entries are the 8-bit colors
# define standard colors
ifneq (,$(findstring xterm,${TERM}))
BLACK := $(shell tput -Txterm setaf 0)
RED := $(shell tput -Txterm setaf 1)
@busterc
busterc / config
Last active May 21, 2025 12:33
[Fix Slow BitBucket] remove IPv6 from ssh/git for bitbucket.org #git #bitbucket #ssh
# https://bitbucket.org/site/master/issues/8809/cloning-and-pushing-excruciatingly-slow#comment-34263833
Host bitbucket.org
AddressFamily inet
@snakers4
snakers4 / Dockerfile
Created July 3, 2018 07:13
My PyTorch 0.4 Dockerfile
# add 7z tar and zip archivers
FROM nvidia/cuda:9.0-cudnn7-devel
# https://docs.docker.com/engine/examples/running_ssh_service/
RUN apt-get update && apt-get install -y openssh-server
RUN mkdir /var/run/sshd
RUN echo 'root:Ubuntu@41' | chpasswd
RUN sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config
RUN mkdir ~/.ssh/
@stewartadam
stewartadam / main.py
Last active September 9, 2024 12:41 — forked from gear11/main.py
Simple Python proxy server based on Flask and Requests with support for GET and POST requests.
"""
A simple proxy server, based on original by gear11:
https://gist.github.com/gear11/8006132
Modified from original to support both GET and POST, status code passthrough, header and form data passthrough.
Usage: http://hostname:port/p/(URL to be proxied, minus protocol)
For example: http://localhost:5000/p/www.google.com
"""
import re
@tshirtman
tshirtman / utils.py
Last active January 19, 2021 00:21
A function to load kv files automatically.
def load_kv():
'''This magical function lookup module name, and load the kv file
with the same name (in the same directory)
'''
filename = inspect.currentframe().f_back.f_code.co_filename
f = extsep.join((splitext(filename)[0], 'kv'))
if exists(f) and f not in Builder.files:
Builder.load_file(f)
@miguelmota
miguelmota / server.go
Last active August 24, 2025 06:50
Golang TCP server example
package server
import (
"bufio"
"fmt"
"log"
"net"
)
// Server ...
@rodnaxel
rodnaxel / install_kivy.sh
Last active August 18, 2020 20:38
Install Kivy on Ubuntu 18.04 (python 3.6)
apt-get install python3-pip
apt-get install cython3 python3-dev
apt-get install libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev libsdl2-mixer-dev
python3.6 -m pip3 install git+https://github.com/kivy/kivy.git@master
apt-get install python3-kivy-examples