Skip to content

Instantly share code, notes, and snippets.

View atomize's full-sized avatar
🎹
♩♩

Berti atomize

🎹
♩♩
View GitHub Profile
@atomize
atomize / cssBookmark.js
Created February 17, 2024 16:14
CSS Bookmark Hack
// Enter this code in to the URL field of a bookmark in chrome
javascript: (function() %7B var elements = document.body.getElementsByTagName('*'); var items = []; for (var i = 0; i < elements.length; i++) %7B if (elements[i].innerHTML.indexOf('* %7B background:#000!important;color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }') != -1) { items.push(elements[i]); } } if (items.length > 0) { for (var i = 0; i < items.length; i++) { items[i].innerHTML = ''; } } else { document.body.innerHTML += '<style>* { background:#000!important;color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }\ * * { background-color: rgba(0,255,0,.2) !important; }\ * * * { background-color: rgba(0,0,255,.2) !important; }\ * * * * { background-color: rgba(255,0,255,.2) !important; }\ * * * * * { background-color: rgba(0,255,255,.2) !important; }\ * * * * * * { background-color: rgba(255,255,0,.2) !important; }\ * * * * * * * { background-
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"basics": {
"name": "Jonathan Berti",
"label": "Full Stack Developer + DevOps",
"image": "",
"email": "jonathan.berti+resume@gmail.com",
"phone": "(312) 600-8123",
"url": "https://berti.dev",
"summary": "I am a Full-Stack Developer with 10+ years professional experience. Developing software is more of a life-long curiosity than it is a job, as I have been coding and using Linux since 1997. I create websites, applications, and back-end solutions, as well as design-deploy-manage the servers that host them. I have a penchant for modern Javascript and diving in to the Web API to make fast, compliant, and maintainable front end experiences. On the back end, I like to solve data integration issues and design solutions to automate communication between applications and services. Across the whole stack, I write code and design systems with attention to speed and scale.",
@atomize
atomize / streamer.js
Created August 6, 2022 19:13 — forked from montanaflynn/streamer.js
Streaming a response with Express.js
var express = require('express')
var app = express()
app.listen(1337)
app.all('/stream/:chunks', function (req, res, next) {
res.writeHead(200, {
'Content-Type': 'text/plain',
@atomize
atomize / EntityModelColor.js
Created July 17, 2022 18:06 — forked from mramato/EntityModelColor.js
Cesium example of coloring a model loaded with the Entity API
var viewer = new Cesium.Viewer('cesiumContainer', {
infoBox : false,
selectionIndicator : false
});
var entity = viewer.entities.add({
position : Cesium.Cartesian3.fromDegrees(-123, 44, 10),
model : {
uri : '../../../Specs/Data/Models/Box/CesiumBoxTest.gltf',
minimumPixelSize : 128
@atomize
atomize / camelCase2capsCase.js
Created January 17, 2022 20:24
camelCase to Camel Case (Caps Case)
const camelCase2capsCase = (inputString) => {
return inputString.replace(/([A-Z])/g, ' $1').replace(/^./, function(str){ return str.toUpperCase(); })
}
const dateBuiltLabel = camelCase2capsCase('dateBuilt');
console.log(dateBuiltLabel) // 'Date Built'
@atomize
atomize / install_jq.sh
Last active May 13, 2021 18:35
Install jq for 64bit Linux via cURL
#!/bin/bash -e
# This scripts installs jq if it is not installed: http://stedolan.github.io/jq/
if ! command -v jq &> /dev/null
then
echo "jq could not be found... installing"
JQ=/usr/bin/jq
curl https://stedolan.github.io/jq/download/linux64/jq > $JQ && chmod +x $JQ
ls -la $JQ
@atomize
atomize / readFileAsync.js
Created April 28, 2020 19:49
Asynchronous version of Node.js readFile.
// make Promise version of fs.readFile() - enc is the encoding (i.e. utf-8)
fs.readFileAsync = function (filename, enc) {
return new Promise(function (resolve, reject) {
fs.readFile(filename, enc, function (err, data) {
if (err) reject(err);
else resolve(data);
});
});
};
@atomize
atomize / flattenObject.js
Created April 28, 2020 19:48
Flatten an object in ES6
const flatten = object => {
return Object.assign({}, ...function _flatten(objectBit, path = '') { //spread the result into our return object
return [].concat( //concat everything into one level
...Object.keys(objectBit).map( //iterate over object
key => typeof objectBit[key] === 'object' ? //check if there is a nested object
_flatten(objectBit[key], `${ path }.${ key }`) : //call itself if there is
({
[`${ path }.${ key }`]: objectBit[key]
}) //append object with it’s path as key
)
@atomize
atomize / mp42gif.sh
Created March 11, 2020 21:39
mp42gif with color filters
#!/bin/bash
#
# Script to convert MP4 video to GIF with generation of custom color palette.
#
#=== Do not touch code below
# Inner variables
input_file=""
input_fps="20"
input_height="512"
from flask import Flask, jsonify, request
from flask_cors import CORS
import usaddress
app = Flask(__name__)
CORS(app)
def addressmaker(inputarr):
newarr = []