Skip to content

Instantly share code, notes, and snippets.

View smac89's full-sized avatar

Nobleman smac89

View GitHub Profile
santisbon / Search my
Last active February 21, 2024 17:01
How to #search gists
View Search my

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.

Find all gists with a .yml extension.

Find all gists with HTML files.

matthewjberger /
Last active February 20, 2024 21:46
Install a nerd font on ubuntu

1.) Download a Nerd Font

2.) Unzip and copy to ~/.fonts

3.) Run the command fc-cache -fv to manually rebuild the font cache

kekru /
Last active February 14, 2024 16:02
nginx TLS SNI routing, based on subdomain pattern

Nginx TLS SNI routing, based on subdomain pattern

Nginx can be configured to route to a backend, based on the server's domain name, which is included in the SSL/TLS handshake (Server Name Indication, SNI).
This works for http upstream servers, but also for other protocols, that can be secured with TLS.


  • at least nginx 1.15.9 to use variables in ssl_certificate and ssl_certificate_key.
  • check nginx -V for the following:
    TLS SNI support enabled
View VMware Workstation 15.x.x serial key
Serial Keys:
trungly /
Last active February 1, 2024 18:51
A simple Python HTTP server that supports a GET that echoes some request data and a POST that reads a request body, parses it as JSON and responds with part of the data
from BaseHTTPServer import BaseHTTPRequestHandler
import urlparse, json
class GetHandler(BaseHTTPRequestHandler):
def do_GET(self):
parsed_path = urlparse.urlparse(self.path)
message = '\n'.join([
'client_address=%s (%s)' % (self.client_address,
thoop / .htaccess
Last active January 27, 2024 14:07
Official .htaccess for Apache.
View .htaccess
# Change YOUR_TOKEN to your prerender token
# Change (at the end of the last RewriteRule) to your website url
<IfModule mod_headers.c>
RequestHeader set X-Prerender-Token "YOUR_TOKEN"
<IfModule mod_rewrite.c>
RewriteEngine On
atenni /
Last active January 19, 2024 08:34
How to permalink to a gist's raw file

Problem: When linking to the raw version of a gist, the link changes with each revision.


To return the first file from a gist:[gist_user]/[gist_id]/raw/

To get a file from multi–file gist:[gist_user]/[gist_id]/raw/[file_name]

geosharma /
Last active January 9, 2024 09:13
Arch Linux: aurutils installation and configuration

aurutils installation and configuration

This is not a getting started guide, just notes to myself. Due to my limited knowledge there could be mistakes and better ways to do things. I have configured aurutils to the best of my knowledge after reading the manpages and forums. Please refer to aurutils(7) manpages for installation and configuration.

Reference: aurutils(7)

Install aurutils

Install the aurutils using the normal AUR package installation procedure. Until I found aurutils, I used to create a separate directory ~/aur/ for all AUR packages.

beci / gcc 5 on ubuntu 14.04
Created October 15, 2015 07:18
use gcc 5.x on ubuntu 14.04
View gcc 5 on ubuntu 14.04
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-5 g++-5
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5
btroncone /
Last active July 16, 2023 14:57
RxJS 5 Operators By Example