Skip to content

Instantly share code, notes, and snippets.

View jalbertbowden's full-sized avatar

albert jalbertbowden

View GitHub Profile
/* Updated 2022-02-28 */
.dashboard {
padding-left: 25px !important;
padding-right: 25px !important;
padding-top: 20px !important;
width: 100%;
grid-template-columns: 25% 25% 25% 25%;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Calendar of Police Killings</title>
<link href="https://fonts.googleapis.com/css2?family=Fira+Sans:ital,wght@0,400;0,700;1,400&display=swap" rel="stylesheet">
<style>
body { font-family: 'Fira Sans'; text-align: center; }
@tkadlec
tkadlec / perf-diagnostics.css
Last active June 8, 2023 17:47
CSS used to highlight potential performance issues
:root {
--violation-color: red; /* used for clear issues */
--warning-color: orange; /* used for potential issues we should look into */
}
/* IMAGES */
/*
* Lazy-Loaded Images Check
* ====
@philshem
philshem / data.json
Last active August 24, 2020 03:26
sample data
{
"1960":316.91,
"1961":317.64,
"1962":318.45,
"1963":318.99,
"1964":319.62,
"1965":320.04,
"1966":321.38,
"1967":322.16,
"1968":323.04,
@bcks
bcks / index.js
Last active November 27, 2020 07:36
tableau-covid-scraping
// Works with Node v12.0 and puppeteer 4.0
const URL = 'https://public.tableau.com/views/PPV_15924847800480/ppv_db?%3Aembed=y&%3AshowVizHome=no&%3Adisplay_count=y&%3Adisplay_static_image=n&%3AbootstrapWhenNotified=true&%3Alanguage=en&:embed=y&:showVizHome=n&:apiID=host0';
const puppeteer = require('puppeteer');
function parseDataDictionary(jsonParsed) {
// This is a hack, a quick and dirty console script for RT/tweets (with replies) removal w/o API
// To be used in: https://twitter.com/Username/with_replies
// Set your username (without @) below (case-sensitive) to correctly trigger the right Menu
const tweetUser = 'Username'
// BUG, With above we still trigger Menu on some replies but relatively harmless.
// @Hack Implement simple has() for querySelector
const querySelectorHas = function( parent, child ){
@dannguyen
dannguyen / autotimestamp-column-in-google-sheets.md
Last active April 30, 2021 17:07
a Google Sheets script that automatically adds a timestamp to a corresponding row when the first column is created

How to automatically timestamp a column when a row in Google Sheets is created

Couldn't be bothered to look up the latest workout tracking app, so decided to stick to Google Sheets for now. One problem with this approach is that while it is easy on desktop GSheets to fill out a current timestamp (Command-Option-Shift-semicolon in MacOS), no such shortcut is available AFAIK in the iOS version of Google Sheets.

image

So I wrote a little custom function in Google Apps Script to do the following:

In an active Google Sheets spreadsheet, given a tab/sheet named myworkouts with a header named datetime, the following script updates a row's corresponding "datetime" column when a value is entered into a first column cell:

@aejolene
aejolene / va_covid_data.R
Last active April 23, 2020 00:18
A rough script to pull geospatial data on COVID-19 cases by county from a Virginia Department of Health ArcGIS feature Service with R.
#################
#This is a very rough script to pull COVID-19 geospatial data from the VDH feature service.
# 2020-04-22
#################
### Uncomment these if you need to install the packages for the first time
## install.packages(c("dplyr", "geojsonsf", "lubridate", "rmapshaper", "sf", "devtools"))
## library(devtools)
## install_github("yonghah/esri2sf")
@aymericbeaumet
aymericbeaumet / delete-likes-from-twitter.md
Last active March 27, 2024 14:21
[Recipe] Delete all your likes/favorites from Twitter

Ever wanted to delete all your likes/favorites from Twitter but only found broken/expensive tools? You are in the right place.

  1. Go to: https://twitter.com/{username}/likes
  2. Open the console and run the following JavaScript code:
setInterval(() => {
  for (const d of document.querySelectorAll('div[data-testid="unlike"]')) {
    d.click()
 }