Skip to content

Instantly share code, notes, and snippets.

This is the year of ipv6 and python3!

Felix fliiiix

This is the year of ipv6 and python3!
View GitHub Profile
struct Attribute<'a> {
name: &'a str,
url: &'a str,
fn main() {
let attributes = vec![
Attribute {
name: "Batman",
soheilhy /
Last active Nov 16, 2022
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for,, and on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

fdelbos /
Last active Feb 17, 2020
FreeBSD 10 Nodejs setup with nginx, mongo and monit

FreeBSD 10 Nodejs setup with nginx, mongodb, redis and monit

This my receipe for installing a complete nodejs server on FreeBSD 10. The parameters used in this configuration are for a very small private server that I use for demo purpose only, so for a production server, you should somehow set the limits in pair with your ressources.

I use monit so I don't have to write rc scripts for node and it should take care of process lifecycle management for me. Alternatives exists such as supervisord or circus.

Installing mongodb

optikfluffel / kitty.zsh
Created Feb 2, 2014
zsh function to download an image from
View kitty.zsh
kitty() { command wget -O kitty.jpg"$2"/"$3" }
stephsharp /
Last active Oct 22, 2020
Stack Overflow user profile Dashing widget

Badge Overflow

An exceptionally handsome way to track your Stack Overflow badges.
Note: Badge Overflow now works with all Stack Exchange sites.

Created by Adam & Stephanie Sharp.

User Profile widget

A Dashing widget that

View That’s Cool
Obviously it's not a huge deal
It just makes me sad
I like Node
And I can write Node
I just don't use it for anything
I like JS
And I can write JS
I just prefer CoffeeScript for day to day use
runlevel5 /
Last active Jul 18, 2022
pumactl is very broken, @nemshilov and @joneslee85 wrote this bash script replacement and it works so reliably on production server. So here it is, share with the world!
#!/usr/bin/env bash
# Simple move this file into your Rails `script` folder. Also make sure you `chmod +x`.
# Please modify the CONSTANT variables to fit your configurations.
# The script will start with config set by $PUMA_CONFIG_FILE by default
spikegrobstein / nginx.conf
Last active Aug 25, 2022
nginx config for proxying requests for plex over a hostname-based virtualhost.
View nginx.conf
upstream plex-upstream {
# change to the hostname:port of your plex server.
# this can be "localhost:32400", for instance, if Plex is running on the same server as nginx.
server {
listen 80;
# server names for this server.
jbtule / AESGCM.cs
Last active Sep 23, 2022
I have two code examples that I wrote for best practices encrypting a string in c#. They are both using authenticated encryption.
View AESGCM.cs
* This work (Modern Encryption of a String C#, by James Tuley),
* identified by James Tuley, is free of known copyright restrictions.
using System;
using System.IO;
using System.Text;
troelskn / app.rb
Last active Aug 12, 2021 — forked from dstrelau/app.rb
Gollum protected by HTTP Basic
View app.rb
require 'gollum/frontend/app'
require 'digest/sha1'
class App < Precious::App
User =, :email, :password_hash, :can_write)
before { authenticate! }
before /^\/(edit|create|delete|livepreview|revert)/ do authorize_write! ; end
helpers do