At the beginning of a session:
- Read this file.
- Read
~/memory/active-projects.md. - Read the last few days of session logs in
~/memory/session-logs/ - Read the relevant project files for the current request.
| ////////////////////// | |
| // QUERIES | |
| ////////////////////// | |
| const Query = (function() { | |
| const receiptsWithCounts = { | |
| name: 'receiptsWithCounts', | |
| query: `{"query":"query | |
| receiptsWithCounts($startDate: String!, $endDate: String!, $documentType: String!, $documentSubType: String!) { | |
| receiptsWithCounts(startDate: $startDate, endDate: $endDate, documentType: $documentType, documentSubType: $documentSubType) { | |
| receipts { |
| function iframeURLChange(iframe, callback) { | |
| var lastDispatched = null; | |
| var dispatchChange = function () { | |
| var newHref = iframe.contentWindow.location.href; | |
| if (newHref !== lastDispatched) { | |
| callback(newHref); | |
| lastDispatched = newHref; | |
| } |
| /* 1. Paste this entire gist over at https://mrcoles.com/bookmarklet/ to generate a bookmarklet */ | |
| /* 2. Use a meaningful Name like: 🎧 📖 Links */ | |
| /* 3. Drag the generated bookmarklet link to your Bookmarks Toolbar. */ | |
| /* 4. Click on the bookmarklet when you're on the Overdrive loan page, e.g. https://yourlibrary.overdrive.com/account/loans */ | |
| /* 5. The "Download MP3 audiobook" link should appear like it used to. */ | |
| $('a[data-format-id="audiobook-overdrive"]').each(function() { | |
| var listenBtn = $(this); | |
| if (listenBtn.hasClass('script-added')) { |
Slack doesn't provide an easy way to extract custom emoji from a team. (Especially teams with thousands of custom emoji) This Gist walks you through a relatively simple approach to get your emoji out.
If you're an admin of your own team, you can get the list of emoji directly using this API: https://api.slack.com/methods/emoji.list. Once you have it, skip to Step 3
HOWEVER! This gist is intended for people who don't have admin access, nor access tokens for using that list.
Follow along...
| #!/bin/bash -e | |
| # -e means exit if any command fails | |
| DBHOST=address.to.your.server | |
| DBUSER=username | |
| DBPASS=password # do this in a more secure fashion | |
| DBNAME=DBNAME | |
| GITREPO=/where/is/your/repo | |
| DUMP=$GITREPO/where/you/store/dumps | |
| NEW=$DUMP/schema.sql | |
| OLD=$NEW.old |
| #!/bin/bash | |
| if [ -z "$1" ] || [ -z "$2" ] ; then | |
| echo "Usage: imsg [address] [message]" | |
| else | |
| /usr/bin/osascript -e 'tell application "Messages" | |
| send "'"$2"'" to buddy "'"$1"'" of service "E:you@icloud.com" | |
| end tell' | |
| echo "Sent" | |
| fi |
| # Verifies the connectivity and validity of the objects in the database | |
| git fsck —unreachable | |
| # Manage reflog information | |
| git reflog expire —expire=0 —all | |
| # Pack unpacked objects in a repository | |
| git repack -a -d -l | |
| # Prune all unreachable objects from the object database |