Skip to content

Instantly share code, notes, and snippets.

View eneiasramos's full-sized avatar

Enéias Ramos de Melo eneiasramos

View GitHub Profile
@eneiasramos
eneiasramos / xprop-remove-title-bar.sh
Created October 31, 2024 06:34 — forked from zenozeng/remove-title-bar.sh
remove title bar using xprop
xprop -id $xid -f _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS "0x2, 0x0, 0x0, 0x0, 0x0"
@eneiasramos
eneiasramos / stack_traces.c
Created July 15, 2024 16:32 — forked from jvranish/stack_traces.c
An example of catching exceptions and printing stack traces in C on Windows, Linux and OS X
/* compile with:
on linux: gcc -g stack_traces.c
on OS X: gcc -g -fno-pie stack_traces.c
on windows: gcc -g stack_traces.c -limagehlp
*/
#include <signal.h>
#include <stdio.h>
#include <assert.h>
@eneiasramos
eneiasramos / gist:566f3142bcec4cd50ddb353b7ec6b27f
Created July 14, 2024 19:20 — forked from terkhorn/gist:4033983
DateTime to epoch conversions for C#, UTC
using System;
namespace YourChoice
{
public static class TimeHelpers
{
public static DateTime FromEpochTime(this long unixTime)
{
var epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
return epoch.AddSeconds(unixTime);
@eneiasramos
eneiasramos / excludeWSL.ps1
Last active April 5, 2024 14:42 — forked from noelbundick/LICENSE
Exclude WSL installations from Windows Defender realtime protection
Requires -RunAsAdministrator
############
# This script will add your WSL environments to the Windows Defender exclusion list so that
# realtime protection does not have an adverse effect on performance.
#
# You should be aware that this could make your system less secure. Use at your own risk.
# Note: This should be run from an administrative PowerShell prompt
############
@eneiasramos
eneiasramos / glibc.md
Created February 21, 2024 00:45 — forked from wagenet/glibc.md
glibc Versions

glibc Versions

List of oldest supported version of top 10 Linux Distros and their glibc version according to distrowatch.com.

Summary

Out of all versions with published EOLs, 2.12 is the oldest glibc still active, found in CentOS 6.8.

If CentOS 6 and 7 are eliminated, the oldest glibc is 2.23 in Ubuntu and Slackware.

Nginx Tip 1. – Organize Nginx Configuration Files
Normally Nginx configuration files are located under /etc/nginx path.
One good way to organize configuration files is use Debian/Ubuntu Apache style setup:
## Main configuration file ##
/etc/nginx/nginx.conf
## Virtualhost configuration files on ##
/etc/nginx/sites-available/
@eneiasramos
eneiasramos / php-fpm-pools.md
Created January 19, 2024 15:40 — forked from holmberd/php-pools.md
Adjusting child processes for PHP-FPM (Nginx)

Adjusting child processes for PHP-FPM (Nginx)

When setting these options consider the following:

  • How long is your average request?
  • What is the maximum number of simultaneous visitors the site(s) get?
  • How much memory on average does each child process consume?

Determine if the max_children limit has been reached.

  • sudo grep max_children /var/log/php?.?-fpm.log.1 /var/log/php?.?-fpm.log
@eneiasramos
eneiasramos / ubuntu-20.04-lts-sources.list
Last active January 5, 2024 07:23 — forked from ishad0w/sources.list
Ubuntu 20.04 LTS (Focal Fossa) -- Full sources.list
deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
@eneiasramos
eneiasramos / ubuntu-22.04-lts-sources.list
Last active December 19, 2023 16:29 — forked from hakerdefo/sources.list
Ubuntu 22.04 LTS (Jammy Jellyfish) complete sources.list
deb http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
@eneiasramos
eneiasramos / dbeaver.ini
Created December 8, 2023 22:55 — forked from souhaiebtar/dbeaver.ini
[dbeaver config file] .ini file for dbeaver #dbeaver #linux
# path on linux /usr/share/dbeaver/dbeaver.ini
# path on macos /Applications/DBeaverEE.app/Contents/Eclipse/dbeaver.ini
-vm
/usr/bin/java
-startup
plugins/org.eclipse.equinox.launcher_1.5.600.v20191014-2022.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.1100.v20190907-0426
-vmargs
-XX:+IgnoreUnrecognizedVMOptions