Skip to content

Instantly share code, notes, and snippets.

View LocNguyenHuu's full-sized avatar
:octocat:
On the way

Stephen LocNguyenHuu

:octocat:
On the way
View GitHub Profile
@LocNguyenHuu
LocNguyenHuu / SQL2SparkSQL.py
Created July 22, 2022 12:39
Awesome script to help you to convert pure SQL to Spark SQL
# Ref: https://sqlandhadoop.com/online-sql-to-pyspark-converter/
from moz_sql_parser import parse
from moz_sql_parser import format
import json
query = """
SELECT product_id,
Count(star_rating) as total_rating,
Max(star_rating) AS best_rating,
Min(star_rating) AS worst_rating
@LocNguyenHuu
LocNguyenHuu / DataGrid.swift
Created July 24, 2021 15:26 — forked from rayfix/DataGrid.swift
A SwiftUI 2D Grid
//
// ContentView.swift
// DataGrid
//
// Created by Ray Fix on 11/14/20.
//
import SwiftUI
struct DataGrid<Element> {
@LocNguyenHuu
LocNguyenHuu / devops_best_practices.md
Created May 7, 2021 08:54 — forked from jpswade/devops_best_practices.md
Devops Best Practices Checklist

Find the original here article here: Devops Best Practices

DevOps started out as "Agile Systems Administration". In 2008, Andrew Shafer did a talk called "Agile Infrastucture" addressing issues around involving more of the company in the same disciplines as programmers.

In 2009, Patrick Debois created "DevOpsDays" conference to help to bring it to light. However, it wouldn't begin to trend until about 2010, when people would begin to describe it as a standalone discipline.

Today, DevOps goes beyond just developers, systems administration and infrastructure, its about [dev, ops, agile, cloud

##############################
## Java
##############################
.mtj.tmp/
*.class
*.jar
*.war
*.ear
*.nar
hs_err_pid*
@LocNguyenHuu
LocNguyenHuu / repo-reset.md
Created April 12, 2021 07:03 — forked from heiswayi/repo-reset.md
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A