Skip to content

Instantly share code, notes, and snippets.

View datduyng's full-sized avatar

Dominic Nguyen datduyng

View GitHub Profile
//https://www.jqueryscript.net/menu/Material-Floating-Action-Button.html
function Fab(json){
var __element = document.querySelector(json.selector);
var positions = ["top-left","top-right","bottom-left","bottom-right"], countposition = 0, status = false;
if (!json.selector || !__element) {
console.error("There is no selector or you have not written one, write one in the option 'selector' in the json");
return false;
}
positions.forEach(function(e, i){
if(positions[i] != json.position){
@diriver63
diriver63 / pyodbc-unixODBC-lambda-layer
Last active April 28, 2025 13:48
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
@datduyng
datduyng / interview-prep.md.md
Last active February 27, 2019 03:25
interview-prep.md

Merging

Merger from branch to master

git checkout master 
git pull #update local master from remote before merge 
git merge BRANCH_NAME # resolve conflict if there are any
@carlochess
carlochess / Pyodbc sqlserver lambda
Created September 3, 2018 03:51
How to install Pyodbc for Sqlserver.
# Start a container that mimic the lambda environment
docker run -it --rm --entrypoint bash -e ODBCINI=/var/task -e ODBCSYSINI=/var/task -v "$PWD":/var/task lambci/lambda:build-python2.7
# Then, download ODBC source code, compile and take the output
curl ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.5.tar.gz -O
tar xvzf unixODBC-2.3.5.tar.gz
cd unixODBC-2.3.5
./configure --sysconfdir=/var/task --disable-gui --disable-drivers --enable-iconv --with-iconv-char-enc=UTF8 --with-iconv-ucode-enc=UTF16LE --prefix=/home
make install
cd ..
@datduyng
datduyng / cs156-java-note.md
Last active June 7, 2019 22:58
cs156-java-note
@ Author Dat Nguyen. Last modified date. 5/17/19

Introduction

  • PHP/java
  • Method are part of class.

helloWorld.

package unl.cse // package declaration

/*csce155e Cbourke

C introduction

1/11/17

  • Programming, compiling and running process
  • Source files are plain text
  • Have to be compile into an excutable program
  • Source – assembly – machine code(binary)