Blog A. Erkan

Short technical notes from a systems and network engineer

Time for the Planet est une entreprise à mission qui souhaite rassembler 1 milliard d'euros pour déployer 100 innovations luttant contre le réchauffement climatique. Il est possible de devenir actionnaire à partir d'un euro investi.

Nous sommes la dernière génération à pouvoir éviter un effondrement du climat. Agissons ensemble !

Si vous souhaitez savoir comment vous engager, c’est par ici : https://www.time-planet.com/fr

Le site : https://www.time-planet.com

La vidéo : https://www.youtube.com/watch?v=DZnWYPM8dzg&t=4s

Follow me on Mastodon FR Follow me on Mastodon EN

Subscribe RSS

Today I joined Time for the Planet as a shareholder. Time for the Planet is a non-profit company, ambitious and passionate, which is dedicated to tackle the most urgent challenge for humanity: climate change. Time for the planet is based on #entrepreneurship, #collectiveintelligence and the sharing of it solutions through #opensource. Want to know more or bring your support?

Check our website: https://join-time.com/Ke5jxhYkTpA

#timefortheplanet

Follow me on Mastodon FR Follow me on Mastodon EN

Subscribe RSS

Bonjour tout le monde.

Si vous cherchez une solution gratuite pour autohébergement, parce que vous ne voulez rien faire tourner chez vous. Regarder du coté votre FAI qui peut proposer un hebergement mutualisé intégré à votre compte. C'est le cas par exemple chez Free. J'ai pu par exemple installer sur le même espace un dokuwiki et un shaarli (partage de notes, liens, etc) La preuve http://aerkan.free.fr En plus, pas de pubs, pas de trackers.

Bien sûr, il y a des inconvénients, les FAI ne sont pas top au niveau de sécurité, Mettre seulement ce que vous souhaitez vraiment partager en publique, comme dans la rue. ;–)

#selfhosted #autohebergement #dokuwiki #shaarli

Follow me on Mastodon FR Follow me on Mastodon EN

Subscribe RSS

screenshot conkyrc

conkyrc-new

conky.config = {
	alignment = 'top_right',
	background  = true,
	border_width = 1,
	color1 = ffffff,
	color2 = ffffff,
	color3 = C12420,
	draw_borders = false,
	draw_graph_borders = false,
	draw_outline = false,
	draw_shades = false,
	double_buffer = true,
	draw_shades = false,
	draw_outline = false,
	draw_borders = false,
	extra_newline = false,
--[[    gap_x = 10,
	gap_y = 80,]]
	no_buffers = true,
	out_to_console = false,
	out_to_stderr = false,
	own_window_class = Conky,
	own_window = true, 
	own_window_transparent = true,
	own_window_argb_visual = true,
	own_window_type = 'normal',
	own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
	stippled_borders = 0,
	use_spacer = 'none',
	update_interval = 1.0,
	use_xft = true,
	xftfont = wareebook,
}
conky.text = [[
INFORMATIONS SYSTEME ${color3}${font Vera:size=9:bold}
Hôte :$alignr$nodename
Uptime :$alignr$uptime

PROCESSEURS ${color3}${font Vera:size=9:bold}
CPU1: ${cpu cpu1}% ${cpubar cpu1}
CPU2: ${cpu cpu2}% ${cpubar cpu2}
CPU3: ${cpu cpu3}% ${cpubar cpu3}
CPU4: ${cpu cpu4}% ${cpubar cpu4}

${top name 1} ${alignr} ${top cpu 1} %
${top name 2} ${alignr} ${top cpu 2} %
${top name 3} ${alignr} ${top cpu 3} %
${top name 4} ${alignr} ${top cpu 4} %

RAM $alignr $mem / $memmax
$memperc% $membar ${color2}${top_mem name 1} ${alignr} ${top mem 1} %
${top_mem name 2} ${alignr} ${top mem 2} %
${top_mem name 3} ${alignr} ${top mem 3} %
${top_mem name 4} ${alignr} ${top mem 4} %
${top_mem name 5} ${alignr} ${top mem 5} %

DISQUES ${color3}${font Vera:size=9:bold}
Racine : ${fs_used_perc /}% ${fs_free /} ${fs_bar 5,120 /}
Home : ${fs_used_perc /home}% ${fs_free /home} ${fs_bar 5,120 /home}

RESEAU ${color3}${font Vera:size=9:bold}
wlp3s0 : ${addr wlp3s0} | ${totaldown wlp3s0} | ${totalup wlp3s0}
enp2s0 : ${addr enp2s0} | ${totaldown enp2s0} | ${totalup enp2s0}
tunsnx : ${addr tunsnx} | ${totaldown tunsnx} | ${totalup tunsnx}
]]

Follow me on Mastodon FR Follow me on Mastodon EN

Subscribe RSS

Example on Ubuntu

sudo apt install jpegoptim

compress by 90% with 4CPU with preserve permissions in same directory

find . -type f -iname "*.jpg" -print0 | xargs -0 -n 10 -P 4 jpegoptim -tp -m 90

compress by 90% with 4CPU with preserve permissions in dest directory

find . -type f -iname "*.jpg" -print0 | xargs -0 -n 10 -P 4 jpegoptim -tp -m 90 -d /temp/

Follow me on Mastodon FR Follow me on Mastodon EN

Subscribe RSS

Download wget -O gitea https://dl.gitea.io/gitea/1.5.0/gitea-1.5.0-linux-arm-7 && chmod +x gitea

Create a user system adduser --system --shell /bin/bash --gecos 'Git Version Control' --group --disabled-password --home /home/git git

Create folders and permissions mkdir -p /home/gitea/{custom,data,indexers,public,log}

chown git:git /home/gitea/{data,indexers,log} && chmod 750 /home/gitea/{data,indexers,log}

Create folder and copy files mkdir /etc/gitea && chown root:git /etc/gitea && chmod 770 /etc/gitea

cp gitea /usr/local/bin/gitea

Create file service /etc/systemd/system/gitea.service

[Unit]
Description=Gitea (Git with a cup of tea)
After=syslog.target
After=network.target

[Service]
RestartSec=2s
Type=simple
User=git
Group=git
WorkingDirectory=/var/lib/gitea/
ExecStart=/usr/local/bin/gitea web -c /etc/gitea/app.ini
Restart=always
Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/var/lib/gitea

[Install]
WantedBy=multi-user.target
Start service

systemctl enable gitea; systemctl start gitea

Continue setup on http://ip-or-name-server:3000

Finish setup

chmod 750 /etc/gitea && chmod 644 /etc/gitea/app.ini

Follow me on Mastodon FR Follow me on Mastodon EN

Subscribe RSS

Debian based

Edit /etc/default/grub and add option GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 ..."

Generate conf file and update grub-mkconfig -o grub.cfg

update-grub

RedHat based

Edit /etc/sysconfig/grub and add option GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 ..."

grub2-update

Follow me on Mastodon FR Follow me on Mastodon EN

Subscribe RSS

Stop Mysql service mysqld stop

Restart with mysqld_safe --defaults-file=/etc/my.cnf --pid-file=/var/run/mysqld/mysqld.pid --skip-grant-tables

Connexion mysql -u root mysql

Change passwd UPDATE user SET password=PASSWORD('newpasswd') WHERE user="root"; exit

Restart service mysqld restart

Connexion with mysql -u root -p

Follow me on Mastodon FR Follow me on Mastodon EN

Subscribe RSS