Skip to content

Instantly share code, notes, and snippets.

@corvax19
corvax19 / openssh-encrypt-decrypt.txt
Last active July 28, 2023 14:10
[/linux/openSSL] Simple text #encryption/#decryption with #openssl
echo -n "That's the text"|openssl enc -e -aes-256-cbc -a
Encrypt with interactive password. Encrypted message is base64-encoded afterwards.
echo -n "That's the text"|openssl enc -e -aes-256-cbc -a -k "MySuperPassword"
Encrypt with specified password. Encrypted message is base64-encoded afterwards.
echo "GVkYiq1b4M/8ZansBC3Jwx/UtGZzlxJPpygyC"|openssl base64 -d|openssl enc -d -aes-256-cbc
Base-64 decode and decrypt message with interactive password.
echo "GVkYiq1b4M/8ZansBC3Jwx/UtGZzlxJPpygyC"|openssl base64 -d|openssl enc -d -aes-256-cbc -k "MySuperPassword"
@xtornasol512
xtornasol512 / .htaccess
Last active December 17, 2015 20:18
Archivos django.fcgi y .htaccess para Deployar django en bluehost
AddHandler fcgid-script .fcgi
Options +SymLinksIfOwnerMatch
RewriteEngine On
RewriteBase /
RewriteRule ^(public/.*)$ - [L]
# Esta linea dirige a static_media
RewriteRule ^(static_media.*)$ - [L]
# La razon que tengo dos es que trabajo en equipo
# y aveces mi equipo usa static o static_media
@andru255
andru255 / gist:7537829
Created November 19, 2013 00:19
.tmux.conf
#seteamos el prefijo
set -g prefix C-a
#limpiamos la combinación por defecto
unbind C-b
#cambiando el delay por default de ejecución de comandos de tmux
set -sg escape-time 1
bind C-a send-prefix
@hectoregm
hectoregm / angularfire-crud-es.md
Last active October 3, 2020 19:05
Tutorial for basic CRUD using AngularJS and Firebase

Tutorial para AngularFire (AngularJS + Firebase)

Introduccion

En este tutorial haremos uso de AnguarJS y de Firebase (esta combinacion es tambien llamada AngularFire) para implementar un CRUD basico para el ingreso de usuarios. En este tutorial se tiene como requisitos tener instalado git y tener una cuenta en Firebase

AngularJS

Es un framework MVC que esta implementado en Javascript este vive en el lado del cliente (navegador) y dado que usaremos como backend a Firebase que nos da un BD desde el cliente es solo necesario un servidor web para poder enviar HTML, CSS y el Javascript de la aplicacion. Haremos uso de un servidor web usando Node.js desde la consola para ver como va nuestra aplicacion.

@kkirsche
kkirsche / aes256-gcm.go
Last active February 23, 2024 14:56
AES-256 GCM Encryption Example in Golang
package example_test
import (
"crypto/aes"
"crypto/cipher"
"hex"
"io"
)
// AES-GCM should be used because the operation is an authenticated encryption
@pahud
pahud / nginx.conf
Last active February 23, 2023 17:32
ngx-lua validating requests from AWS API Gateway with client certificate
server {
listen 443 ssl;
server_name gw.pahud.net;
ssl_certificate /opt/openresty/nginx/conf/ssl/chained.crt;
ssl_certificate_key /opt/openresty/nginx/conf/ssl/private-key.pem;
ssl_client_certificate /opt/openresty/nginx/conf/ssl/apigw.crt;
ssl_verify_client optional;
ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
@xjdrew
xjdrew / client.go
Last active June 20, 2024 07:39
golang tls client and server, require and verify certificate in double direction
package main
import (
"crypto/tls"
"crypto/x509"
"flag"
"io"
"io/ioutil"
"log"
"os"
@danielef
danielef / hamachi.sh
Created March 28, 2022 19:23
Hamachi Ubuntu 18.04 Jetson arm64
sudo dpkg --add-architecture armhf
sudo apt-get update
sudo apt-get install libc6:armhf
sudo ln -s /lib/ld-linux-armhf.so.3 /lib/ld-linux.so.3
sudo apt-get install libstdc++6:armhf
sudo wget https://www.vpn.net/installers/logmein-hamachi_2.1.0.203-1_armhf.deb
sudo dpkg -i logmein-hamachi_2.1.0.203-1_armhf.deb
sudo hamachi login
sudo hamachi attach-net my@mail.com