Skip to content

Instantly share code, notes, and snippets.

@skryking
skryking / _mastodon_toots.erb
Created March 13, 2024 21:55
Infinite Scroll Up and down.
<% if direction != "older" && toots.count > 0 %>
<div id="get-newer-<%= target %>">
<%= tag.div(
data: {
controller: "load-newer",
load_newer_target_value: target,
load_newer_url_value: root_path,
}
) %>
</div>
@skryking
skryking / gist:3277119d84d8b5544ad2be92dc9a216a
Created March 11, 2018 01:53
example of selenium headless chrome in python and jypiter notebook
from selenium import webdriver
from IPython.display import Image
import pprint
client = None
options = webdriver.ChromeOptions()
options.add_argument('headless')