this goes in my bash profile:
XRESET='\[\033[00m\]'
PROMPT_PATH="\[\033[0;33m\]\W${XRESET} \[\033[1;37m\]\$${XRESET}"
PROMPT_GHOST="༼ つ\[\033[1;33m\]°${XRESET}\[\033[1;31m\]︻\[\033[1;33m\]゜${XRESET}༽つ🐕"
export PS1="${PROMPT_GHOST} ${PROMPT_PATH} "
this goes in my bash profile:
XRESET='\[\033[00m\]'
PROMPT_PATH="\[\033[0;33m\]\W${XRESET} \[\033[1;37m\]\$${XRESET}"
PROMPT_GHOST="༼ つ\[\033[1;33m\]°${XRESET}\[\033[1;31m\]︻\[\033[1;33m\]゜${XRESET}༽つ🐕"
export PS1="${PROMPT_GHOST} ${PROMPT_PATH} "
Example Google Apps Script functions to normalize non-ASCII characters and insert a timestamp, when a new row is created.
Basically I sloppily added various Vietnamese accented characters to this Gist example: https://gist.github.com/akora/51b2933a2554776d7144#gistcomment-2936646
Blogpost about Apps Script in general, onEdit and timestamps here: http://blog.danwin.com/how-to-automatically-timestamp-a-new-row-in-google-sheets-using-apps-script/
test test test
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.
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:
[ | |
{ | |
"id": 0, | |
"name": "Adirondack Explorer", | |
"homepageUrl": "https://www.adirondackexplorer.org", | |
"supportUrl": "https://www.adirondackexplorer.org/subscription-center/new-combined-digital-and-print-subscription", | |
"city": "Saranac Lake", | |
"state": 36, | |
"lat": "44.329496", | |
"long": "-74.1312662" |
date | close | |
---|---|---|
2-Jan-08 | 194.84 | |
3-Jan-08 | 194.93 | |
4-Jan-08 | 180.05 | |
7-Jan-08 | 177.64 | |
8-Jan-08 | 171.25 | |
9-Jan-08 | 179.40 | |
10-Jan-08 | 178.02 | |
11-Jan-08 | 172.69 | |
14-Jan-08 | 178.78 |
The two JSON files in this gist are partial extracts from the ad-impressions.js file that Twitter gave me when I requested my personal data archive. This JSON file includes all the ads I expereinced on Twitter from December 8 2019 to Jan 8 2020.
I was just curious about ads from @McKinsey and @boba, particularly who they wanted to target, which is something that the ad-impressions.js file tells you.
tl;dr based on my personal data, I didn't really learn anything surprising. But read on for some details if you're kind of interested about social media data and ad targeting.
# Helpful resources: | |
# https://superuser.com/questions/1188772/mac-command-to-change-the-background-color-in-a-terminal | |
# https://apple.stackexchange.com/questions/348762/how-to-have-a-random-background-color-in-terminal-app | |
# https://stackoverflow.com/questions/8063228/how-do-i-check-if-a-variable-exists-in-a-list-in-bash | |
cbg(){ | |
local OCMD="" | |
local RED=0; local GRN=0; local BLU=0; | |
local THEMES="pro basic grass homebrew ocean" ## preset themes | |
local HELPMSG; read -r -d '' HELPMSG <<EOF |
This gist is meant just as remote storage for two text files, hello.txt
and world.txt
, as used by my data wrangling template project example:
https://github.com/dannguyen/pydataproject-template
Direct URLs for the files:
<!doctype html><title>PRODUCTION READY CODE MOTHAF KER!</title> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"> | |
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script> |