Source:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import random | |
import markdownify | |
from bs4 import BeautifulSoup | |
from selenium import webdriver | |
client = webdriver.Firefox() | |
OUTPUT_DIR = 'output/' | |
TARGET_URL = 'https://huggingface.co/posts' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// On-demand JavaScript objects from "current" HTML <meta> elements. Example: | |
// | |
// <meta name="current-identity-id" content="123"> | |
// <meta name="current-identity-time-zone-name" content="Central Time (US & Canada)"> | |
// | |
// >> Current.identity | |
// => { id: "123", timeZoneName: "Central Time (US & Canada)" } | |
// | |
// >> Current.foo | |
// => {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Controller } from "@hotwired/stimulus" | |
export default class extends Controller { | |
static targets = [ "dependee", "dependant" ] | |
connect() { | |
this.#checkDependee() | |
} | |
check({ target }) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="flex flex-col space-y-2 p-4 border-2 border-dashed border-purple-400 rounded-lg"> | |
<div class="bg-red-100 text-red-700 px-4 py-2 rounded-md flex items-center space-x-2"> | |
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5"> | |
<path stroke-linecap="round" stroke-linejoin="round" d="M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z" /> | |
</svg> | |
<span>Queued</span> | |
</div> | |
<div class="bg-orange-100 text-orange-700 px-4 py-2 rounded-md flex items-center space-x-2"> | |
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if ! gem list overmind -i --silent; then | |
echo "Installing overmind..." | |
gem install overmind | |
fi | |
# Default to port 3000 if not specified | |
export PORT="${PORT:-3000}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/initializers/email_interceptors.rb | |
if Rails. env.staging? | |
ActionMailer::Base.register_interceptors(Interceptors::StagingEmailInterceptor) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ApplicationMailer < ActionMailer::Base | |
using Refinements::Mailings | |
protected | |
def render_text_for(template_name) | |
text = render_to_string(template_name, formats: :html).html_to_plain | |
render(plain: text) | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create base image | |
FROM ruby:3.2-slim-bookworm AS base | |
# Set ENV variables | |
ENV RAILS_ENV=production \ | |
RACK_ENV=production \ | |
NODE_ENV=production \ | |
APP_ENV=production \ | |
RAILS_LOG_TO_STDOUT=true \ | |
RAILS_MAX_THREADS=10 \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .github/dependabot.yml | |
# To get started with Dependabot version updates, you'll need to specify which | |
# package ecosystems to update and where the package manifests are located. | |
# Please see the documentation for all configuration options: | |
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | |
version: 2 | |
updates: | |
- package-ecosystem: "bundler" |