Skip to content

Instantly share code, notes, and snippets.

{
"basics": {
"name": "Thomas Edison",
"label": "Inventor and Businessman",
"picture": "https://example.com/photo.jpg",
"email": "thomas.edison@example.com",
"phone": "(123) 456-7890",
"url": "https://thomasedison.com",
"summary": "Prolific inventor and businessman known for developing many devices that greatly influenced life around the world, including the phonograph, the motion picture camera, and the electric light bulb.",
"location": {
@skitol
skitol / yumget.md
Created April 19, 2023 23:35
yum vs apt-get

cheat sheet comparing some common YUM commands in AWS Linux and their equivalent APT-GET commands in Ubuntu:

AWS Linux YUM Command Ubuntu APT-GET Command Description yum update apt-get update Updates the package repository with the latest version of available packages yum install [package-name] apt-get install [package-name] Installs the specified package yum remove [package-name] apt-get remove [package-name] Removes the specified package yum search [keyword] apt-cache search [keyword] Searches for packages containing the specified keyword yum info [package-name] apt-cache show [package-name] Displays detailed information about the specified package yum clean all apt-get clean Clears the local cache of downloaded package files yum list installed dpkg --list Lists all installed packages

@skitol
skitol / TripData.json
Last active January 27, 2023 03:06
SafeTrack Monitor
{
"child": {
"name": "Jane Doe",
"age": 12,
"gender": "female",
"emergency_contact": {
"name": "John Doe",
"phone": "555-555-5555",
"relationship": "father"
},
@skitol
skitol / get-fda-amazon-products.js
Created December 31, 2022 18:04
search and rank amazon results by FDA product code
const axios = require('axios');
const natural = require('natural');
exports.handler = async (event) => {
// Extract the product code from the event path
const productCode = event.pathParameters.productCode;
try {
// Make the HTTP GET request to the FDA API and wait for the response
const { data } = await axios({
@skitol
skitol / .eslintrc.json
Last active December 27, 2022 07:40
common
{
"root": true,
"env": {
"es2021": true,
"node": true
},
"extends": "airbnb-base",
"overrides": [],
"parserOptions": {
"ecmaVersion": "latest",
@skitol
skitol / index.html
Created December 8, 2021 17:11
WebGIS
<!--Page Preloader-->
<div class="loader-container" id="preloader">
<div class="loader">
<div class="loader-inner box1"></div>
<div class="loader-inner box2"></div>
<div class="loader-inner box3"></div>
</div>
</div>
<div id="sidebar" class="leaflet-sidebar collapsed">
@skitol
skitol / import-data.py
Last active June 17, 2020 23:49
AWS import shapefile
import os
import wget
import zipfile
import geopandas as gpd
team_id = os.getEnv("TEAM_ID")
dl_link = 'https://s3.amazonaws.com/watersheds/'+team_id+'.zip'
shapefile_dir = './shapefiles'
shapefile_name =team_id+'watersheds.shp'
shapefile = os.path.join(shapefile_dir, shapefile_name)

Git Cheat Sheet

Visit my blog.

Commands

Getting Started

git init

@skitol
skitol / geojson2heat.js
Last active February 7, 2020 02:31
leaflet heat geojson
var geojson2heat = function(geojson, options) {
options = options || {};
var heat = geojson.features.map(function(d) {
var lng = d.geometry.coordinates[0];
var lat = d.geometry.coordinates[1];
var compounds = d.properties.Compounds;
var sum = 0;
for (var key in compounds) {
//Convert val from string to numeric
var number = compounds[key].replace(',', '');