Skip to content

Instantly share code, notes, and snippets.

View xhit's full-sized avatar

Santiago De la Cruz xhit

View GitHub Profile
@taoyuan
taoyuan / npm-using-https-for-git.sh
Last active September 2, 2026 16:29
Force git to use https:// instead of git://
# npm using https for git
git config --global url."https://github.com/".insteadOf git@github.com:
git config --global url."https://".insteadOf git://
# npm using git for https
git config --global url."git@github.com:".insteadOf https://github.com/
git config --global url."git://".insteadOf https://
package main
import (
"fmt"
"io"
"os"
)
var path = "/Users/novalagung/Documents/temp/test.txt"
@denji
denji / golang-tls.md
Last active August 19, 2026 07:24 — forked from spikebike/client.go
Simple Golang HTTPS/TLS Examples
Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
@hyamamoto
hyamamoto / create_jpeg_then_send.dart
Last active October 16, 2020 13:31
A Dart snippet for "creating a JPEG image on client-side, then sending it to the server" .
import 'package:crypto/crypto.dart';
import 'dart:html';
import 'dart:typed_data';
void main() {
// Draw an on-memory image.
final CanvasElement canvas = document.createElement('canvas');
canvas.width = 256;
canvas.height = 256;
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream