Skip to content

Instantly share code, notes, and snippets.

View keltia's full-sized avatar

Ollivier Robert keltia

View GitHub Profile
@bortzmeyer
bortzmeyer / atom-mastodon-jq.md
Created May 2, 2017 13:08
A complicated and useless method to get the Atom feed of a Mastodon user

[Yes, I know there is a far simpler method.]

 curl -s 'https://mastodon.gougere.fr/.well-known/webfinger?resource=bortzmeyer@mastodon.gougere.fr' | \
     jq '.links[] | if (.type == "application/atom+xml") then .href else "" end'
""
"https://mastodon.gougere.fr/users/bortzmeyer.atom"
""
""
""
Date : 2017-02-26
macOS Sierra 10.12.3
Installer homebrew
------------------
Site de Homebrew : https://brew.sh/index_fr.html
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install -o install_homebrew
/usr/bin/ruby install_homebrew
@alirobe
alirobe / reclaimWindows10.ps1
Last active May 22, 2024 20:58
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###
@renchap
renchap / README.md
Last active October 12, 2022 17:14
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 {
@xrstf
xrstf / letsencrypt.md
Last active April 18, 2023 05:01
Let's Encrypt on Ubuntu 14.04, nginx with webroot auth

Let's Encrypt on Ubuntu 14.04, nginx with webroot auth

This document details how I setup LE on my server. Firstly, install the client as described on http://letsencrypt.readthedocs.org/en/latest/using.html and make sure you can execute it. I put it in /root/letsencrypt.

As it is not possible to change the ports used for the standalone authenticator and I already have a nginx running on port 80/443, I opted to use the webroot method for each of my domains (note that LE does not issue wildcard certificates by design, so you probably want to get a cert for www.example.com and example.com).

Configuration

For this, I placed config files into etc/letsencrypt/configs, named after <domain>.conf. The files are simple:

@jpillora
jpillora / go-get-gitlab-ssh-nginx
Created May 10, 2015 08:38
Go get Gitlab ssh paths with nginx
location / {
## check for goget AND /namespace/project
if ($args ~* "^go-get=1") {
set $condition goget;
}
if ($uri ~ ^/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$) {
set $condition "${condition}path";
}
if ($condition = gogetpath) {
return 200 "<!DOCTYPE html><html><head><meta content='git.axon$uri git ssh://git@gitlab.mycompany.com:2200$uri.git' name='go-import'></head></html>";
@pr1ntf
pr1ntf / iohyve.sh
Last active October 13, 2021 11:03
iohyve v0.2.5 -- bhyve manager based on iocage for FreeBSD
#!/bin/sh
# iohyve v0.2.5 2015/05/06 "ALL HAIL LINUS edition"
# Process command line
__parse_cmd () {
while [ $# -gt 0 ] ; do
case "$1" in
version) __version
exit
@kennwhite
kennwhite / vpn_psk_bingo.md
Last active February 24, 2024 12:19
Most VPN Services are Terrible

Most VPN Services are Terrible

Short version: I strongly do not recommend using any of these providers. You are, of course, free to use whatever you like. My TL;DR advice: Roll your own and use Algo or Streisand. For messaging & voice, use Signal. For increased anonymity, use Tor for desktop (though recognize that doing so may actually put you at greater risk), and Onion Browser for mobile.

This mini-rant came on the heels of an interesting twitter discussion: https://twitter.com/kennwhite/status/591074055018582016

@dlangille
dlangille / example
Last active October 8, 2022 13:52
New script for snapshots of iocage jails for backups
This is example output from the script below. I have since amended the script from example, to full functional.
Recents changes mean that umounted datasets will not be backed up.
You should read this in conjunction with https://gist.github.com/dlangille/dac3b6d138bb12874f9a which outlines the Bacula job.
$ zfs list system/iocage/jails
NAME USED AVAIL REFER MOUNTPOINT
system/iocage/jails 31.8G 344G 104K /iocage/jails
@iMilnb
iMilnb / gist:7604f04223d44a3e13af
Last active June 17, 2023 16:14
Keep track of Twitter "unfollowers"
#!/bin/sh
# track unfollows on twitter using "t" https://github.com/sferik/t
# usage:
#
# to check if any of your followers has stopped following you since the last
# time the script wall called, use:
# $ this_script followers
#
# to check if YOU stopped following someone (it appears many of us witnessed