Skip to content

Instantly share code, notes, and snippets.

@passuf
passuf / mount-ram.sh
Last active August 29, 2015 14:12 — forked from koshigoe/mount-ram.sh
#!/bin/sh
# This program has two feature.
#
# 1. Create a disk image on RAM.
# 2. Mount that disk image.
#
# Usage:
# $0 <dir> <size>
#
@passuf
passuf / .gitignore
Created September 27, 2015 13:57 — forked from kogakure/.gitignore
Git: .gitignore file for LaTeX projects
*.aux
*.glo
*.idx
*.log
*.toc
*.ist
*.acn
*.acr
*.alg
*.bbl
@passuf
passuf / README.md
Created May 18, 2016 10:23 — forked from renchap/README.md
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 {
@passuf
passuf / .xprofile
Last active April 2, 2023 09:13 — forked from zoqaeski/custom
Remap Logitech R400 Presenter Keys
# Add these commands to your ~/.xprofile file
/usr/local/bin/map_logitech_r400_keys_exec &
/usr/local/bin/file-inotify /tmp/logitech-r400.lock /usr/local/bin/map_logitech_r400_keys_exec &
@passuf
passuf / git-status
Last active June 5, 2017 17:54 — forked from mzabriskie/README.md
Check git status of multiple repos, source: https://gist.github.com/mzabriskie/6631607
#!/bin/bash
dir="$1"
# No directory has been provided, use current
if [ -z "$dir" ]
then
dir="`pwd`"
fi