Skip to content

Instantly share code, notes, and snippets.

View jhemarcos's full-sized avatar
🎯
Focusing

Jean Marcos jhemarcos

🎯
Focusing
View GitHub Profile
@ThinGuy
ThinGuy / del-stuck-ip.sh
Created June 11, 2021 22:00
Delete Observed "stuck" IP from MAAS
#!/bin/bash
[[ -z ${1} || ${1} =~ -h ]] && { printf "\n\e[2GUsage: ${0##*/} <ip_address>\n\n";exit 2; } || { export STUCK_IP=${1}; }
# MAAS IP Address Allocation
# Type Name
# ━━━━ ━━━━
# 0 AUTO
# 1 STICKY
@harshpatel991
harshpatel991 / https-instance.config
Last active August 2, 2017 14:08
AWS Elastic Beanstalk config for signed SSL certificate using a single instance with Lets Encrypt certbot and apache.
# This will setup a hardened SSL/TLS for an Elastic Beanstalk application configured to use a single EC2 instance using Apache
# This configuration should get you an A on the Qualys SSL Server Test.
# This configuration will continue to serve unsecure requests on port 80.
# Be sure to verify you are using the latest version of your platform in Elastic Beanstalk.
# The following Environment Properties are *required* to be set:
# CERT_EMAIL - this is the email address passed to certbot-auto
# SERVER_DOMAIN - the DNS name that will be assoicated with the certificate (ex: domain.com)
@Mevrael
Mevrael / WebSocketController.php
Created March 14, 2017 10:40
Laravel + WebSocket (Ratchet/ReactPHP) integration
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Cookie;
use Illuminate\Support\Facades\Mail;
use Illuminate\Support\Facades\Session;
use Ratchet\WebSocket\Version\RFC6455\Connection;
@0xjac
0xjac / private_fork.md
Last active May 18, 2024 21:41
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@HughJeffner
HughJeffner / CompositeX509TrustManager.java
Last active June 9, 2022 21:01
Trust both system KeyStore and custom KeyStore on Android
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Iterables;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import java.util.Arrays;
import java.util.List;
@plentz
plentz / nginx.conf
Last active May 17, 2024 09:08
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@bradmontgomery
bradmontgomery / install-comodo-ssl-cert-for-nginx.rst
Last active April 1, 2024 11:21
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert