Skip to content

Instantly share code, notes, and snippets.

View judavi's full-sized avatar

Juan judavi

  • Palet Town
View GitHub Profile
@denji
denji / golang-tls.md
Last active April 29, 2024 03:39 — forked from spikebike/client.go
Simple Golang HTTPS/TLS Examples

Moved to git repository: https://github.com/denji/golang-tls

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)
@ibrahimlawal
ibrahimlawal / LC_CTYPE.txt
Created February 27, 2017 07:02 — forked from jampajeen/LC_CTYPE.txt
Centos warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
vi /etc/environment
add these lines...
LANG=en_US.utf-8
LC_ALL=en_US.utf-8
@kekru
kekru / Docker connect to remote server.md
Last active April 15, 2024 16:26
Connect to another host with your docker client, without modifying your local Docker installation

Run commands on remote Docker host

This is how to connect to another host with your docker client, without modifying your local Docker installation or when you don't have a local Docker installation.

Enable Docker Remote API

First be sure to enable the Docker Remote API on the remote host.

This can easily be done with a container.
For HTTP connection use jarkt/docker-remote-api.

@pepoviola
pepoviola / key_to_json
Last active April 4, 2024 03:56
convert new lines into \n for use ssh key in json
sed ':a;N;$!ba;s/\n/\\n/g' my_key.pem
or in vi
:%s/\n/\\n/
https://tickets.opscode.com/browse/CHEF-3540
@MBing
MBing / install_wlan_dongle.sh
Last active April 3, 2024 05:20
install TP-Link-WN725N Nano USB Wifi on Raspberry Pi with Kernel 5.10+
# DO NOT PUT THE WIFI DONGLE IN THE DEVICE BEFORE MENTIONED EXPLICITLY BELOW
# Brief note, after this the UI will not show the usb dongle,
# the wifi does work and I get an IP address, so all works,
# but I don't go into detail of making it show on the Raspbian UI.
# (for this purpose I don't care about the UI)
# For the use of this I connected my device to an ethernet connection and through the Router could see the IP which I can SSH into.
## STEP 1: Prepare machine and install packages needed
@bradrydzewski
bradrydzewski / generate_docker_cert.sh
Last active March 12, 2024 17:00
Generate trusted CA certificates for running Docker with HTTPS
#!/bin/bash
#
# Generates client and server certificates used to enable HTTPS
# remote authentication to a Docker daemon.
#
# See http://docs.docker.com/articles/https/
#
# To start the Docker Daemon:
#
# sudo docker -d \
@alexseward
alexseward / OculusQuestCloudGaming.md
Last active February 5, 2024 02:16 — forked from blixt/OculusQuestCloudGaming.md
Playing SteamVR games on the Oculus Quest

Inspired by https://gist.github.com/blixt/97009dfa3eb916dbd4624a38191fe10d and https://github.com/steventhegeek/Parsec-Cloud-Preparation-Tool. Thanks to @blixt and @steventhegeek :)

Setting up your Virtual Machine

We'll be creating a new Virtual Machine on Microsoft's cloud platform, Azure. The VM will have a beefy GPU just like a home computer so it can be used for playing games.

  1. Go to [the Azure portal][azure] and sign up or log in.
  2. If you are on a Free account, first go to Subscriptions and upgrade it to a Pay-as-you-go plan. Don't worry, you will get to keep any free credits you have. Azure's interface is a bit slow so this will take a minute.

⚠️ Make sure to not include any support plan because they will charge you monthly!

@yocontra
yocontra / kali-install.sh
Last active January 28, 2024 06:33
installing private internet access on kali linux
apt-get install network-manager-openvpn
wget https://www.privateinternetaccess.com/openvpn/openvpn.zip
mv openvpn.zip /etc/openvpn
cd /etc/openvpn
unzip openvpn.zip
rm -rf openvpn.zip
# set up the rest in the gui
# gateway = us-east.privateinternetaccess.com
# CA.crt will be in /etc/openvpn
@dsmrt
dsmrt / query-aws-logs-insights.bash
Last active December 14, 2023 11:27
Using AWS CLI to query CloudWatch Logs with Insights. Looking -30 mins to now.
# this script queries aws logs with insights filtering on ERROR
# explanation of start and end times
#--start-time = unix timestamp 30 mins in the past
#--end-time = unix timestamp now
QUERY_ID=$(aws logs start-query \
--profile $profile \
--log-group-name /aws/lambda/aap-event-consumer-dev \
--start-time `date -v-30M "+%s"` \
@sr75
sr75 / wget-jdk-oracle-install-example.txt
Last active March 16, 2023 11:28
wget command to install Oracle JAVA JDK from stupid oracle website for centos and ubuntu
http://d.stavrovski.net/blog/post/how-to-install-and-setup-oracle-java-jdk-in-centos-6
# rpm
wget --no-cookies \
--no-check-certificate \
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
"http://download.oracle.com/otn-pub/java/jdk/7u55-b13/jdk-7u55-linux-x64.rpm" \
-O jdk-7-linux-x64.rpm
# ubuntu