Skip to content

Instantly share code, notes, and snippets.

View angristan's full-sized avatar
:shipit:
o(≧▽≦)o

Stanislas angristan

:shipit:
o(≧▽≦)o
View GitHub Profile
@angristan
angristan / h2o.service
Created November 17, 2016 22:01
h2o webserver systemd init script
[Unit]
Description=H2O - the optimized HTTP/1, HTTP/2 server
After=network-online.target nss-lookup.target remote-fs.target
[Service]
Type=simple
PIDFile=/run/h2o.pid
ExecStart=/usr/local/bin/h2o --mode master --conf /etc/h2o/h2o.conf
ExecReload=/bin/kill -HUP $MAINPID
ExecStop=/bin/kill -TERM $MAINPID
@angristan
angristan / h2o.conf
Created November 17, 2016 22:01
h2o webserver exemple conf, just in case
user: www-data
num-threads: 2
max-connections: 1024
pid-file: /run/h2o.pid
access-log: /var/log/h2o/access.log
error-log: /var/log/h2o/error.log
http1-request-timeout: 10
file.dirlisting: OFF
hosts:
"website.tld:80":
@angristan
angristan / autoexec.cfg
Last active March 18, 2017 14:25
Personnal CS:GO conf
// Crosshair
cl_crosshair_drawoutline "1"
cl_crosshair_dynamic_maxdist_splitratio "0.35"
cl_crosshair_dynamic_splitalpha_innermod "1"
cl_crosshair_dynamic_splitalpha_outermod "0.5"
cl_crosshair_dynamic_splitdist "7"
cl_crosshair_outlinethickness "0.1"
cl_crosshairalpha "1000"
cl_crosshaircolor "1"
cl_crosshaircolor_b "255"

Keybase proof

I hereby claim:

  • I am angristan on github.
  • I am angristan (https://keybase.io/angristan) on keybase.
  • I have a public key ASCvz4pVclwO1ydYa-7t88TJ4SVEyASogumOwH6c-5yLqgo

To claim this, I am signing this object:

@angristan
angristan / ip.php
Created January 23, 2018 22:25
Get the client IP address and reverse DNS
<?php
echo $_SERVER['REMOTE_ADDR'];
echo "<br>";
$hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);
echo $hostname;
?>
@angristan
angristan / docker-compose-update.sh
Created March 10, 2018 19:17
docker-compose update
docker-compose pull
docker-compose up -d
docker system prune -af
@angristan
angristan / Dockerfile.alpine
Created April 7, 2018 09:35
Pleroma dockerfiles drafts
FROM elixir:1.6.4-alpine
ENV UID=911 GID=911
RUN apk -U upgrade \
&& apk add \
build-base \
wget \
git \
&& rm -rf /tmp/* /var/cache/apk/*
# Défi n°1
villes = ['Paris', 'New York', 'Berlin', 'Montréal']
puts "DEFI N°1 - Si j'étais en vacances, j'irais à..."
villes.each do |ville|
puts ville
end
const readline = require('readline');
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
});
const ask = () => {
rl.question('> ', res => {
console.log(res);
ask();
@angristan
angristan / borgmatic.yml
Created July 29, 2018 20:17
borgmatic example
location:
source_directories:
- /backup/lyra/files/rsync
one_file_system: true
repositories:
- /backup/lyra/files/borg
storage:
compression: zstd
umask: 0077