Skip to content

Instantly share code, notes, and snippets.

:shipit:
o(≧▽≦)o

Stanislas angristan

:shipit:
o(≧▽≦)o
View GitHub Profile
@angristan
angristan / install_docker.sh
Last active Jun 13, 2020
Script to install Docker and Docker-Compose on Debian
View install_docker.sh
#!/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 / hosts
Last active May 31, 2020
Windows 10 Privacy Hosts file
View hosts
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
View tp.py
import ply.yacc as yacc
import ply.lex as lex
from genereTreeGraphviz2 import printTreeGraph
tokens = (
'NUMBER', 'MINUS',
'PLUS', 'TIMES', 'DIVIDE',
'LPAREN', 'RPAREN', 'PRINT',
'EQUALS', 'NAME', 'IF', 'SEMICOLON',
'GTH', 'LTH', 'GTHOREQUAL', 'LTHOREQUAL', 'EQUALEQUAL', 'NOTEQUAL', )
@angristan
angristan / single-node-es.md
Last active Apr 6, 2020
Elasticsearch settings for single-node cluster (1 shard, 0 replica)
View single-node-es.md

Elasticsearch settings for single-node cluster

1 shard, 0 replica.

For future indices

Update default template:

curl -X PUT http://localhost:9200/_template/default -H 'Content-Type: application/json' -d '{"index_patterns": ["*"],"order": -1,"settings": {"number_of_shards": "1","number_of_replicas": "0"}}' 
@angristan
angristan / angristan_crypto_currencies.md
Last active Mar 7, 2020
My cryptocurrency addresses
View angristan_crypto_currencies.md

Thanks for donating!

  • BTC bc1qwjpa374gq9rywnrdt60r2alp8ugjemfnuvm9lf
  • ETH 0x8559064B126196D9ef41685CFc747A7afB91A87A
  • LTC MLL7xq5XHCfvqqA4H82neakeRBHKtDSKXV
@angristan
angristan / install-arch.sh
Last active Feb 12, 2020
Install Arch Linux
View install-arch.sh
# Prepare env
timedatectl set-ntp true
timedatectl set-timezone Europe/Paris
# Partition disk
parted /dev/sda mklabel gpt
parted -a optimal /dev/sda mkpart primary fat32 0% 512MB
parted /dev/sda set 1 esp on
parted -a optimal /dev/sda mkpart primary linux-swap 512MB 2560MB
parted -a optimal /dev/sda mkpart primary ext4 2560MB 100%
@angristan
angristan / mstdn.io_blocklist.md
Last active Aug 24, 2019
mstdn.io block list
View mstdn.io_blocklist.md

mstdn.io block list

Reminder on block types

Block type Explanation
Reject media Removes locally stored media files and refuses to download any in the future.
Silence Makes the account's/instance's posts invisible to anyone who isn't following them
Silence + reject media Combination of the two above
Suspend Removes all of the account's content, media, and profile data
View rpi_temp.json
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": null,
"fill": 1,
"gridPos": {
"h": 9,
"w": 12,
View rpi_cpu_freq.json
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": null,
"fill": 1,
"gridPos": {
"h": 9,
"w": 12,
@angristan
angristan / mysql-cheatsheet.md
Last active Jun 27, 2019
MySQL cheatsheet
View mysql-cheatsheet.md

Manage databases

Create database

CREATE DATABASE database;

Delete database

You can’t perform that action at this time.