Skip to content

Instantly share code, notes, and snippets.

View fedir's full-sized avatar
🌤️
The sun is behind every cloud

Fedir RYKHTIK fedir

🌤️
The sun is behind every cloud
View GitHub Profile
@fedir
fedir / go_imagemagickgo_pdf.md
Last active March 8, 2019 16:54
Go > ImageMagick & JPG2PDF on Debian / Ubuntu

Go > ImageMagick & JPG2PDF on Debian / Ubuntu

Installation

sudo apt-get install libmagickwand-dev
go get -u gopkg.in/gographics/imagick.v2/imagick

Additional ressources

@fedir
fedir / fix_mysql_too_many_fiels.md
Created March 8, 2019 11:47
Fix MySQL "[ERROR] Error in accept: Too many open files" on start on Debian

Fix MySQL "[ERROR] Error in accept: Too many open files" on start

Check system limtis

cat /proc/$(cat /var/run/mysqld/mysqld.pid)/limits

Update system limits

$ vim /etc/security/limits.conf
@fedir
fedir / iptables_route_ports.md
Created March 7, 2019 18:19
iptables routes port 80 to 4000

iptables port routing from 80 to 4000

Configuration

Route via iptables

$ iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 4000

Make it persistent (on Debian, Ubuntu)

@fedir
fedir / argon2i.php
Last active February 21, 2019 10:37
PHP Argon2i test
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
echo password_hash("test", PASSWORD_ARGON2I) . "\n";
// expected output:
// $argon2i$v=19$m=1024,t=2,p=2$Si9YUTV5Mk50clRPckJmNg$iiaHUvfJpx2fwVJLUDr2J0XePR31gxxIu5VHlgFMA/k
git clone https://github.com/GoogleCloudPlatform/kubernetes-engine-samples
cd kubernetes-engine-samples/hello-app
cat main.go
cat Dockerfile
gcloud container clusters get-credentials <;cluster-name> \
gcloud container clusters get-credentials cluster-1 --zone europe-west1
docker build -t gcr.io/meeetup-golang-marseille-03/hello-node:v1 $PWD
gcloud docker -- push gcr.io/meetup-golang-marseille-03/hello-node:v1
kubectl run hello-node --image=gcr.io/meetup-golang-marseille-03/hello-node:v1 --port=8080
kubectl expose deployment hello-node --type="LoadBalancer"
@fedir
fedir / README.md
Last active February 19, 2019 14:52

Open Weather API call

Installation procedure

  • Create scripts
  • Define CITY_ID and APP_ID in each script
  • Add scritps into the crontab

Crontab

@fedir
fedir / fosdem_2019.md
Created February 18, 2019 22:23
FOSDEM 2019 > Videos ranking
@fedir
fedir / shutter-edit-linux-mint-19.sh
Created December 6, 2018 13:13
Stutter / Edit button enable / Linux Mint 19
mkdir ~/libgoo-canvas-perl
cd ~/libgoo-canvas-perl
wget http://archive.ubuntu.com/ubuntu/pool/universe/libg/libgoo-canvas-perl/libgoo-canvas-perl_0.06-2ubuntu3_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/libe/libextutils-depends-perl/libextutils-depends-perl_0.405-1_all.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/libe/libextutils-pkgconfig-perl/libextutils-pkgconfig-perl_1.15-1_all.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/g/goocanvas/libgoocanvas3_1.0.0-1_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/g/goocanvas/libgoocanvas-common_1.0.0-1_all.deb
sudo dpkg -i *.deb
sudo apt install -f
@fedir
fedir / typo3camp-nantes-cms-6-top-9-update-notes.md
Last active December 6, 2018 09:18 — forked from mkrappitz/typo3camp-nantes-cms-6-top-9-update-notes.txt
TYPO3camp Nantes TYPO3 CMS 6 to 9 Update Notes

Notes of Matthias Krappitz for the TYPO3 CMS 6 to 9 update session of the installation https://www.kastrati.com/ on the Sunday of the TYPO3Camp Nantes 2018. Makes only sense for participants of the session

From 6 to 7

  • set development system DB settings inf AdditionalConfiguration.php on domain condition
  • execute DB Compare
  • set Preview Domain in PageTs on domain condition
  • set TS Domain Conditions for Frontend to Dev Environment
  • extension updates (EXT:powermail only up to 2.25.3 for now)
@fedir
fedir / web-summit-2018-likes.md
Last active November 23, 2018 15:39
web-summit-2018