Skip to content

Instantly share code, notes, and snippets.

@firedev
firedev / Hotwire Turbo Debugger.md
Last active January 24, 2024 17:16
Hotwire/Turbo CSS Debugger
  • Install Stylebot or another CSS extension
  • Paste CSS
  • Enjoy highlighted turbo-frames, forms, and changed elements on the page
image
@searls
searls / .solargraph.yml
Last active August 2, 2023 09:14 — forked from DRBragg/.solargraph.yml
My config with steps to use solargraph for Rails projects in VS Code (WIP)
---
include:
- ".solargraph_definitions.rb"
- "app/**/*.rb"
- "config/**/*.rb"
- "lib/**/*.rb"
exclude:
- test/**/*
- vendor/**/*
- ".bundle/**/*"
@dteoh
dteoh / command.md
Created September 15, 2021 00:26
Interactively delete git branches locally

Delete multiple Git branches with a UI

This assumes you have installed [fzf][1].

$ git branch --no-color | fzf -m | xargs -I {} git branch -D '{}'

Press tab to mark a branch, shift-tab to unmark. Press enter and all marked branches will be deleted.

@alexeevit
alexeevit / app.md
Last active December 5, 2019 06:45 — forked from the-teacher/app.md
Rails Mailer Yandex

Gemfile

gem 'rails_config'

config/settings/development.yml

mailer:
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active May 3, 2024 13:01
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@jwoertink
jwoertink / 00_notes.txt
Last active February 15, 2019 05:33
Our production deployment setup for deploying Lucky on to Elastic Beanstalk in production.
We develop locally on MacOS. Due to some issues with cross compilation, we build the crystal binary on docker locally,
then zip that up and ship that along with the docker stuff to elasticbeanstalk.
@RoyalIcing
RoyalIcing / Dockerfile
Last active April 2, 2020 17:06
Rails 5.1 Dockerfile
FROM ruby:2.4-alpine
ENV PATH /root/.yarn/bin:$PATH
RUN apk update && apk upgrade && \
apk add --no-cache bash git openssh build-base nodejs tzdata
RUN apk update \
&& apk add curl bash binutils tar gnupg \
&& rm -rf /var/cache/apk/* \
@apolloclark
apolloclark / Twitter API with Curl
Last active November 10, 2023 11:36
Twitter API with Curl
# create an account, create an app
# @see https://apps.twitter.com/
# retrieve the access tokens
# @see https://dev.twitter.com/oauth/reference/post/oauth2/token
# create the file ~/twitter_api
nano ~/twitter_api
Authorization: OAuth oauth_consumer_key="XXXXXX", oauth_nonce="11111111", oauth_signature="XXXXXX", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1450728725", oauth_token="99999-XXXXXX", oauth_version="1.0"
# List of all uploaded videos and playlists on a YouTube Channel
# Note that YouTube API v3 requires a key. Create a browser API key with a referer at https://console.developers.google.com.
#
# Here are the steps using "curl" that matches the Ruby code below:
#
# Get channel information.
# curl --referer "YOUR_REFERER" "https://www.googleapis.com/youtube/v3/channels?part=snippet,contentDetails,statistics,status&maxResults=50&forUsername=YOUR_USERNAME&key=YOUR_KEY"
# Find "Uploads" playlist ID at items => contentDetails => relatedPlaylists => uploads.
# Find Channel ID at items => id.
#
@cuth
cuth / debug-scroll.md
Last active February 7, 2024 18:17
Find the elements that are causing a horizontal scroll. Based on http://css-tricks.com/findingfixing-unintended-body-overflow/

Debug Horizontal Scroll

(function (d) {
    var w = d.documentElement.offsetWidth,
        t = d.createTreeWalker(d.body, NodeFilter.SHOW_ELEMENT),
        b;
    while (t.nextNode()) {
        b = t.currentNode.getBoundingClientRect();
 if (b.right > w || b.left < 0) {