Skip to content

Instantly share code, notes, and snippets.

View cham11ng's full-sized avatar
🎯
Focusing

Sagar Chamling cham11ng

🎯
Focusing
View GitHub Profile
@diriver63
diriver63 / pyodbc-unixODBC-lambda-layer
Last active June 26, 2024 12:50
pyodbc and unixODBC for MSSQL as a lambda layer
# use https://github.com/lambci/docker-lambda to simulate a lambda environment
docker run -it --rm --entrypoint bash -e ODBCINI=/opt/odbc.ini -e ODBCSYSINI=/opt/ lambci/lambda:build-python3.7
# download and install unixODBC
# http://www.unixodbc.org/download.html
curl ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.7.tar.gz -O
tar xzvf unixODBC-2.3.7.tar.gz
cd unixODBC-2.3.7
./configure --sysconfdir=/opt --disable-gui --disable-drivers --enable-iconv --with-iconv-char-enc=UTF8 --with-iconv-ucode-enc=UTF16LE --prefix=/opt
@cham11ng
cham11ng / linux-ubuntu-configuration.md
Last active October 22, 2023 13:01
Linux (Ubuntu) Configuration

Linux Configuration

By: Sagar Chamling

First Upgrade

sudo apt update
sudo apt upgrade
@cham11ng
cham11ng / git-ssh-configuration.md
Last active July 13, 2024 19:04
Configuring SSH for Git

Git Installation and SSH Configuration

By: Sagar Chamling

Installation

For Linux (Debian/Ubuntu):

sudo apt install git

A Relatively Secure LEMP Server Stack Setup in Ubuntu 16.04 LTS

By Anup Dhakal

Introduction

In this guide, LEMP stands for Linux, Nginx (pronounced as Engine-X) , MariaDB (a drop in replacement for MySQL) and PHP (PHP Hypertext Preprocessor).

I have gone through many websites in order to learn even just the basics of setting up a LEMP server. Hence I know the hassle. Here I have created a through guide to help someone relatively new to setup a powerful LEMP machine easily and effortlessly. I hope this guide comes to someone's rescue.

@jacurtis
jacurtis / App\Exceptions\Handler.php
Created July 28, 2016 02:31
How to get filp/whoops to work in Laravel 5.2 or 5.3 - Add this code to your `App\Exceptions\Handler.php` file.
/**
* Create a Symfony response for the given exception.
*
* @param \Exception $e
* @return mixed
*/
protected function convertExceptionToResponse(Exception $e)
{
if (config('app.debug')) {
$whoops = new \Whoops\Run;
@gilbitron
gilbitron / .env.travis
Last active August 12, 2023 08:06
Laravel 5 Travis CI config
APP_ENV=testing
APP_KEY=SomeRandomString
DB_CONNECTION=testing
DB_TEST_USERNAME=root
DB_TEST_PASSWORD=
CACHE_DRIVER=array
SESSION_DRIVER=array
QUEUE_DRIVER=sync
@max-mapper
max-mapper / 0.md
Last active February 25, 2024 12:24
JS hoisting by example

JavaScript function hoisting by example

Below are many examples of function hoisting behavior in JavaScript. Ones marked as works successfuly print 'hi!' without errors.

To play around with these examples (recommended) clone them with git and execute them with e.g. node a.js

Notes on hoisting

(I may be using incorrect terms below, please forgive me)