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

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 / hosts
Last active May 31, 2020 15:00
Windows 10 Privacy Hosts file
0.0.0.0 choice.microsoft.com
0.0.0.0 choice.microsoft.com.nsatc.net
0.0.0.0 df.telemetry.microsoft.com
0.0.0.0 diagnostics.support.microsoft.com
0.0.0.0 feedback.microsoft-hohm.com
0.0.0.0 feedback.search.microsoft.com
0.0.0.0 feedback.windows.com
0.0.0.0 oca.telemetry.microsoft.com
0.0.0.0 oca.telemetry.microsoft.com.nsatc.net
0.0.0.0 onesettings-bn2.metron.live.com.nsatc.net
@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"
@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 / install_docker.sh
Last active October 11, 2023 14:52
Script to install Docker and Docker-Compose on Debian
#!/bin/bash
apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common sudo
curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg | sudo apt-key add -
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") $(lsb_release -cs) stable"
apt-get update
@angristan
angristan / mysql-cheatsheet.md
Last active June 27, 2019 21:33
MySQL cheatsheet

Manage databases

Create database

CREATE DATABASE database;

Delete database

@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/*