Skip to content

Instantly share code, notes, and snippets.

@keshavbahadoor
keshavbahadoor / cloudSettings
Last active February 1, 2020 16:31
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-02-01T16:31:27.958Z","extensionVersion":"v3.4.3"}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
@keshavbahadoor
keshavbahadoor / android_amazon_apps_uninstall
Last active May 13, 2023 04:37
Uninstall Amazon apps from Amazon Android phones
Download SDK Platform-Tools and unzip to a location https://developer.android.com/studio/releases/platform-tools
Open a cmd/terminal window in platform-tools dir
Connect Device
Ensure that android device is properly connected via platform tools
adb devices
Enter adb shell on device
adb shell
@keshavbahadoor
keshavbahadoor / flatten_array_example.py
Created December 24, 2017 16:20
Flatten Array in Python without language specific
def flatten_array(array, result=None):
"""
Flatten a given array of arbitrarily nested arrays of integers.
e.g. [[1,2,[3]],4] -> [1,2,3,4]
:param array: Input array to flatten
:param result: Starting result array. Can be omitted.
:return: Flattened array
"""
try:
@keshavbahadoor
keshavbahadoor / remove_bloat.ps1
Created December 16, 2017 01:52
Remove Windows 10 Bloat
Get-AppxPackage *3dbuilder* | Remove-AppxPackage
Get-AppxPackage *windowscamera* | Remove-AppxPackage
Get-AppxPackage *zunemusic* | Remove-AppxPackage
Get-AppxPackage *getstarted* | Remove-AppxPackage
Get-AppxPackage *windowsmaps* | Remove-AppxPackage
Get-AppxPackage *solitairecollection* | Remove-AppxPackage
Get-AppxPackage *bingfinance* | Remove-AppxPackage
Get-AppxPackage *zunevideo* | Remove-AppxPackage
Get-AppxPackage *bingnews* | Remove-AppxPackage
Get-AppxPackage *people* | Remove-AppxPackage
@keshavbahadoor
keshavbahadoor / sql_to_csv.py
Created May 11, 2017 15:14
Convert SQL Query to CSV File in Python
# Generic reader method
# Reads data, prints columns, and prints each row to file
def do_query_to_csv_file(cursor, sql, csv_file):
try:
cursor.execute(sql)
file_header = ''
f = open(file_dir + csv_file + '.csv', 'w')
columns = [column[0] for column in cursor.description]
for col in columns: