Skip to content

Instantly share code, notes, and snippets.

View asraful's full-sized avatar

Asraful Forhad Chowdhury asraful

  • Independent Contractor
  • Tampere,Finalnd
  • X @AsrafulC
View GitHub Profile
@asraful
asraful / dbeaver.ini
Created June 9, 2023 08:07 — 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
@asraful
asraful / get_cloudwatch_logs.py
Created July 12, 2021 16:02 — forked from eldondevcg/get_cloudwatch_logs.py
Pull down cloudwatch logs with boto
# IF YOU INCUR HUGE COSTS WITH THIS OR IT BREAKS DON'T BLAME ME License
# This is a throw-away script I wrote to pull the json events for all of the streams from a cloudwatch log
# For some reason, the naive way to do vpc network logging does logging to different streams in a cloudwatch
# log based on interface.
# Great for diagnosing lots of things, and generating verbose logs, but for the broad-stroke analysis I was doing,
# all I really wanted was the basic data. This would have been easier if I had logged to s3, but I did not see a
# way to do that in 2 clicks.
group_name = 'CHANGEME'
@asraful
asraful / azuredeploy.json
Created March 19, 2021 15:05 — forked from dzeyelid/azuredeploy.json
Sample of ARM template to deploy Azure Database for MySQL.
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters":{
"databaseForMySqlAdminName": {
"type": "string"
},
"databaseForMySqlAdminPassword": {
"type": "securestring"
},
@asraful
asraful / logback.xml
Created December 3, 2019 09:33 — forked from HaVonTe1/logback.xml
logback - print filename and line number
<configuration>
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<file>myapp.log</file>
<encoder><pattern>%logger{35} - [%F:%L] - %msg%n</pattern></encoder>
</appender>
<appender name="ASYNC" class="ch.qos.logback.classic.AsyncAppender">
<appender-ref ref="FILE" />
<!-- add the following line -->
<includeCallerData>true</includeCallerData>
@asraful
asraful / redshift_connect.py
Created November 20, 2019 08:40 — forked from varver/redshift_connect.py
Python script to connect with Redshift on AWS with SCHEMA support.
############ REQUIREMENTS ####################
# sudo apt-get install python-pip
# sudo apt-get install libpq-dev
# sudo pip install psycopg2
# sudo pip install sqlalchemy
# sudo pip install sqlalchemy-redshift
##############################################
import sqlalchemy as sa
from sqlalchemy.orm import sessionmaker
@asraful
asraful / ELK with Nginx.md
Created July 15, 2019 19:32 — forked from Dev-Dipesh/ELK with Nginx.md
Setting up Elasticsearch, Logstash and Kibana with Nginx.

ELK (Elasticsearch Logstash Kibana)

Though we're focused more on server setup procedure in this document, I will still give a very brief explanation in laymen terms for ELK. To those who are starting new in this stack, must have already heard of MVC (Model View Controller), so take it like this:

  • Model => Elasticsearch (for Storage, Indexing & Search)
  • View => Kibana (for DataViz & G-Man, yeah the one in half life 😏)
  • Controller => Logstash (For Logs & Filtering)

@asraful
asraful / springer-free-maths-books.md
Created December 29, 2015 14:07 — forked from bishboria/springer-free-maths-books.md
Springer have made a bunch of books available for free, here are the direct links
@asraful
asraful / SUID.java
Last active August 29, 2015 14:26 — forked from formix/SUID.java
64 bits Sufficiently Unique Id Generator
/****************************************************************************
* Copyright 2009-2015 Jean-Philippe Gravel, P. Eng. CSDP
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software