Skip to content

Instantly share code, notes, and snippets.

View thattejada's full-sized avatar
:shipit:

Diego Tejada thattejada

:shipit:
View GitHub Profile
@souhaiebtar
souhaiebtar / dbeaver.ini
Last active May 18, 2024 07:07
[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
@syahzul
syahzul / how-to-install-oci8-on-macos-10.15-catalina-with-php-7.3-7.4-homebrew.md
Last active May 10, 2024 20:22
How to install OCI8 on macOS 10.15 (Catalina) with PHP 7.3 or 7.4 (Homebrew)

How to install OCI8 on macOS 10.15 (Catalina) with PHP 7.3 or 7.4

Requirements

  • Homebrew
  • Command Line Tools for Xcode
  • PHP 7.3 or 7.4 via Homebrew

Preparation

@madan712
madan712 / export_db.py
Last active January 10, 2024 17:48
Python - export mysql table to excel file
import xlsxwriter
import mysql.connector
def fetch_table_data(table_name):
# The connect() constructor creates a connection to the MySQL server and returns a MySQLConnection object.
cnx = mysql.connector.connect(
host='localhost',
database='schema',
user='user',
@adam-hanna
adam-hanna / systemd-cloudwatch-logs-tutorial.md
Last active June 12, 2024 04:04
Forward systemd service logs to AWS Cloudwatch

Introduction

I often find myself ssh'ing into my servers and checking my systemd service logs with $ journalctl -f -u {name}.service. One day I got tired of this and wanted all of my important logs in once place (Amazon AWS Cloudwatch). To my dismay, there weren't any real good tutorials on how to do so. So, voilà.

Steps

Overall, it's a fairly simple process consisting of the following few steps.

1. Modify the service file

Open the service file with $ sudo vi /lib/systemd/system/{name}.service

Modify the [Service] section:

@gdellicarpini
gdellicarpini / aliases_centos.md
Last active April 8, 2024 19:02
Add permanent aliases in Linux CentOS

Aliases for all users

  • Create a file in /etc/profile.d/ directory

      - myAlias.sh
    
  • Define the alias in the file

      alias gotoserver1="ssh user@192.168.1.100"
    
@gene1wood
gene1wood / all_aws_lambda_modules_python.md
Last active May 25, 2024 20:06
AWS Lambda function to list all available Python modules for Python 2.7 3.6 and 3.7