Skip to content

Instantly share code, notes, and snippets.

View cham11ng's full-sized avatar
🎯
Focusing

Sagar Chamling cham11ng

🎯
Focusing
View GitHub Profile
""" Logging utility module. """
import logging
# import logstash
from logstash_async.handler import AsynchronousLogstashHandler
from elasticecslogging.handlers import ElasticECSHandler
from laudio import config
@cham11ng
cham11ng / locks.md
Last active April 27, 2020 08:50
SQL Locks Research

Some findings:

  • Exclusive lock (X) This lock type, when imposed, will ensure that a page or row will be reserved exclusively for the transaction that imposed the exclusive lock, as long as the transaction holds the lock. (imposed by DML Statments)

DBMS products use a locking mechanism to control access and modifications while ensuring data integrity.

  1. SQL Table hints
@cham11ng
cham11ng / configure_authorized_keys.md
Last active November 27, 2019 04:36
Setup SSH in Github

This is what got me working. Staring at C:\ProgramData\ssh\sshd_config I noticed this line was commented!!!

#PubkeyAuthentication yes

No idea how that happened; my box was pre-imaged. I uncommented that, plus ensured that these two lines in the config file were commented out:

#Match Group administrators
#      AuthorizedKeysFile __PROGRAMDATA__/ssh/administrators_authorized_keys
@cham11ng
cham11ng / generate_model.py
Created August 29, 2019 16:26
Python Model Script
text = """
_id = StringField(db_column='id', null=False)
_name = StringField(db_column='name', null=False)
_site_id = StringField(db_column='site_id', null=False)
_city = StringField(db_column='city', null=False)
_region = StringField(db_column='region', null=False)
_state = StringField(db_column='state', null=False)
_street_address = StringField(db_column='street_address', null=False)
_tenant = StringField(db_column='tenant', null=False)
_observation_tag = StringField(db_column='observation_tag', null=False)
@cham11ng
cham11ng / dynamodb.md
Last active August 5, 2019 16:09
DynamoDB KickOff

DynamoDB Basics

Tables, attributes, and other objects in DynamoDB must have names. All names must be encoded using UTF-8, and are case-sensitive.

Table names and index names must be between 3 and 255 characters long, and can contain only the following characters:

  • a-z
  • A-Z
@cham11ng
cham11ng / get-started.md
Last active July 7, 2017 19:43
Python Notes

Python

  • General-Purpose Programming Language
  • Python Software Foundation
  • Creator Guido van Rossum (Dutch Programmer, Netherlands)
  • Logo, two snakes

PyPI

The Python Package Index is a repository of software for the Python programming language. The Python Package Index (PyPI) hosts thousands of third-party modules for Python.

@cham11ng
cham11ng / c-panel-storage:link.php
Last active June 26, 2017 14:51
Snippet Collection
@cham11ng
cham11ng / LEPP.md
Last active September 23, 2023 10:01
LEPP Setup - Ubuntu 16.04 LTS

A Relatively Secure Server Stack Setup in Ubuntu 16.04 LTS

Anup Dhakal

Sagar Chamling

Introduction

In this guide, LEPP stands for Linux, Nginx (pronounced as Engine-X) , Postgres and PHP (PHP Hypertext Preprocessor).

@cham11ng
cham11ng / taiga.md
Created February 9, 2017 10:52
Taiga Integration

Taiga Integration

First: Configure the integration module in Taiga

  1. Go to Admin > Integrations > GitHub or Bitbucket
  2. Fill secret key or use the auto generated one
  3. Copy the payload URL input

Second: Configure Webhooks in your GitHub repository

  1. Click on Settings > Webhooks & Services > Add webhook
  2. On that screen set the payload url with the payload url from Taiga