Skip to content

Instantly share code, notes, and snippets.

View ravinot's full-sized avatar
😎
Straight outta Croydon

Ravi Sundram ravinot

😎
Straight outta Croydon
View GitHub Profile
@cemerson
cemerson / archive.org-scanned-book-downloader-bookmarklet.md
Last active March 6, 2026 14:28
Archive.org Scanned Book Downloader Bookmarklet

Archive.org Scanned Book Downloader Bookmarklet

A simple "1-click" javascript approach to downloading a scanned book from archive.org to read at your leisure on the device of your choosing w/out having to manually screenshot every pages of the book by hand. In short it's a glorified "Save Image As..." approach but consolidated down to "1 click". BTW there may be a much better option than this out there - I just built this as an autistic project to see if it would work.

Demo Video

Archive.org SBDL Demo

Obligatory Legal/Disclaimer:

By using this script you agree to delete all book files/images after your 1 hour or 14 days is up! I don't support using this script for any other use cases. After all, none of us have ever kept a library book past it's return date, right?

@saksters
saksters / group-gsc-dates-to-week.py
Created March 15, 2021 19:46
Groups GSC daily clicks together into weekly intervals from Sunday to Saturday
import pandas as pd
df = pd.read_csv('Dates.csv')
df['Date'] = pd.to_datetime(df.Date)
df_week = df.resample('W-SAT', on='Date').Clicks.sum()
df_week.to_csv('export.csv')
Seven different types of CSS attribute selectors
// This attribute exists on the element
[value]
// This attribute has a specific value of cool
[value='cool']
// This attribute value contains the word cool somewhere in it
[value*='cool']
@felixqueisler
felixqueisler / Minimal 2019.alfredappearance
Created June 11, 2019 12:58
Alfred Theme Minimal 2019
{
"alfredtheme" : {
"result" : {
"textSpacing" : 5,
"subtext" : {
"size" : 10,
"colorSelected" : "#FEFFFEC4",
"font" : "System",
"color" : "#C6C6C665"
},
@zaydek-old
zaydek-old / bookmark.min.js
Last active May 28, 2024 19:18
A *simple* CSS debugger. To use, bookmark "Debug CSS" at https://zaydek.github.io/debug.css. Learn more here https://medium.freecodecamp.org/88529aa5a6a3 and https://youtu.be/2QdzahteCCs?t=1m25s (starts at 1:25)
/* debug.css | MIT License | zaydek.github.com/debug.css */ if (!("is_debugging" in window)) { is_debugging = false; var debug_el = document.createElement("style"); debug_el.append(document.createTextNode(`*:not(g):not(path) { color: hsla(210, 100%, 100%, 0.9) !important; background: hsla(210, 100%, 50%, 0.5) !important; outline: solid 0.25rem hsla(210, 100%, 100%, 0.5) !important; box-shadow: none !important; filter: none !important; }`)); } function enable_debugger() { if (!is_debugging) { document.head.appendChild(debug_el); is_debugging = true; } } function disable_debugger() { if (is_debugging) { document.head.removeChild(debug_el); is_debugging = false; } } !is_debugging ? enable_debugger() : disable_debugger();
@nazmunshi
nazmunshi / twitter_analysis_UPDATED.rmd
Last active August 21, 2018 18:42
Code used in my "What's Your Twitter Story?" article on datacritics.com
Unless otherwise specified, code has been adapted from the book 'Text Mining with R' by Julia Silge and David Robinson.
A big thank you to both of these #rstats experts for their work in tidy text mining and for making their work so easily accessible for newcomers like myself.
Also a big thank you to Hadley Wickham for all his work on dplyr and tidyr, two packages also used in this project. His co-authored book with Garrett Grolemund called 'R for Data Science' is another exceptional resource for beginners.'R for Data Science' book link: http://r4ds.had.co.nz/index.html
And finally a big (or as One Direction would say: MASSIVE) THANK YOU to Terry, and Jake without whose encouragment and support I would not have finished this. MY VERY FIRST ARTICLE!!
You can follow along with my article, and the 'Text Mining with R' explanations (https://www.tidytextmining.com/twitter.html), and code to get a better understanding
To download your own Twitter archive, follow the instructions here: https://help.twitter.com/en
@imjakedaniels
imjakedaniels / SpotifyWebScraper.Rmd
Last active February 4, 2021 21:35
Building a Web scraper, rvest, purr, dplyr, and ggplot2
```{r}
#packages
library(rvest)
library(tidyverse)
library(magrittr)
library(scales)
library(knitr)
library(lubridate)
```
@iambrianreich
iambrianreich / google-reviews.php
Last active March 4, 2026 16:58
Use the Google Places API to render a Google My Business reviews badge on a WordPress site using shortcodes.
<?php /** @noinspection SpellCheckingInspection */
/**
* This file contains the WordPress code for rendering a Google Reviews badge.
*
* Usage:
*
* 1. Create a Google API Console account if you have not already done so.
* 2. Register for the Google Places API.
* 3. Create an API key.
* 4. Ensure that the API key can be used from wherever this script will execute
@nickytonline
nickytonline / cobalt2_agnoster_theme.jpg
Last active November 7, 2020 09:29
My VS Code Setup
cobalt2_agnoster_theme.jpg
@alishalisha
alishalisha / states.md
Last active January 6, 2021 06:59
Checking state on product design patterns

Checking the State of Your States

If applicable, make sure your design component accounts for all these states. This is basically copied from the Nine States of Design Medium article. 😛

  • Initial state: What happens before your component does anything? Maybe it’s the first time a user sees it. Maybe it’s not activated yet. Essentially, the component exists but hasn’t started.
  • Loading state: Have you accounted for when a user will be waiting for something to happen? What does that look like?
  • Empty state: Your component has initialized, but it’s empty. No data. No Items. Now may be a good time to get the user to act (“Do this thing!”), or to reward them (“Good job, everything is taken care of”).
  • One state: You have some data. On an input, this may be after the first keystroke. In a list, it might be when you have one item (or one left).
  • Some data state: This is usually what you think