Skip to content

Instantly share code, notes, and snippets.

View denysvitali's full-sized avatar

Denys Vitali denysvitali

View GitHub Profile
@renchap
renchap / README.md
Last active February 14, 2025 13:25
One-line certificate generation/renews with Letsencrypt and nginx

Prerequisites : the letsencrypt CLI tool

This method allows your to generate and renew your Lets Encrypt certificates with 1 command. This is easily automatable to renew each 60 days, as advised.

You need nginx to answer on port 80 on all the domains you want a certificate for. Then you need to serve the challenge used by letsencrypt on /.well-known/acme-challenge. Then we invoke the letsencrypt command, telling the tool to write the challenge files in the directory we used as a root in the nginx configuration.

I redirect all HTTP requests on HTTPS, so my nginx config looks like :

server {
@gbaudoin
gbaudoin / Bvr.php
Last active January 2, 2023 09:03
Calcul du chiffe-clé en PHP, modulo 10 récursif, BVR PostFinance Suisse
<?php
/**
* Calcul du chiffre-clé en PHP, modulo 10, récursif BVR Suisse
* Berechnung der Prüfziffer nach Modulo 10, rekursiv BESR Schweiz
* Calculating the Check Digits Using Module 10, Recursively
*
* @author gbaudoin
* @license GPL
* @see https://www.postfinance.ch/content/dam/pf/de/doc/consult/manual/dldata/efin_recdescr_man_fr.pdf
* @see https://gist.github.com/christianmeichtry/9348451
@Arnie97
Arnie97 / remove_watermark.py
Last active February 4, 2025 11:47
Removes the annoying watermarks of it-ebooks.info's downloaded eBooks
#!/usr/bin/env python3
import sys
import re
import shutil
import argparse
import binascii
#
# Author: Daxda
@Falconerd
Falconerd / gulpfile.js
Last active April 10, 2019 17:16
Gulp + Watchify + Babelify + BrowserSync
/**
* This gulpfile will copy static libraries and a index.html file as well as
* merge, babelify and uglify the rest of the javascript project.
*
* TODO:
* - Separate media, libs and src with different watchers.
* - Media and libs should only be copied to dist if they are different sizes.
*
* The expected project is to be laid out as such:
*
@Fornoth
Fornoth / Notes.md
Last active December 9, 2024 16:02
Makes a device show up in spotify connect devices list, but nothing else yet

#Python Script Setup

To get the python script running, run either pip install flask or pip install -r requirements.txt if you used git clone to clone the gist

#libspotify_embedded_shared.so notes

##Using the library (still in progress) There's a compile.sh that compiles a program that calls SpInit(), but doesn't get any farther because it needs more than just the API version number (which is 4)

##Spotify appkey

@bloodyowl
bloodyowl / gist:41b1de3388c626796eca
Last active April 20, 2020 03:27
es6 event-emitter
var DEFAULT_MAX_LISTENERS = 12
function error(message, ...args){
console.error.apply(console, [message].concat(args))
console.trace()
}
class EventEmitter {
constructor(){
this._maxListeners = DEFAULT_MAX_LISTENERS
@tstellanova
tstellanova / jetson_hdmi_config.md
Last active May 26, 2021 10:30
Enable and Disable HDMI display on Jetson TK1

All operations as root:

turn off HDMI:

echo -1 > /sys/kernel/debug/tegra_hdmi/hotplug
echo 4 > /sys/class/graphics/fb0/blank

turn on HDMI:

### Keybase proof
I hereby claim:
* I am renchap on github.
* I am renchap (https://keybase.io/renchap) on keybase.
* I have a public key whose fingerprint is 1472 7DB9 0955 2EE8 8263 20C6 78AB 8C20 FBA2 CD92
To claim this, I am signing this object:
@rischanlab
rischanlab / matlab.desktop
Created May 20, 2014 06:27
Create Shortcut application in Desktop Ubuntu
#in this case I use matlab application in Ubuntu
sudo wget http://upload.wikimedia.org/wikipedia/commons/2/21/Matlab_Logo.png -O /usr/share/icons/matlab.png
#download image for matlab
#go to this path
/usr/share/applications/matlab.desktop
#Insert this content to the matlab.desktop
[Desktop Entry]

With TigerVNC

TigerVNC is the only vnc client that seems to support proxmox's SSL encryption scheme.

If you're willing to install it on your client, run the following:

ssh -L 1234:localhost:1234 mimosa.tree.ewdev.ca -l root -- socat tcp-l:1234,range=127.0.0.1/32 exec:"'"qm vncproxy 119"'"

tigervnc localhost:1234