Skip to content

Instantly share code, notes, and snippets.

@nntrn
nntrn / espn-api-list.md
Last active December 12, 2025 21:42
List of nfl api endpoints from espn

List of NFL API Endpoints

This page has been updated a lot in the past 3 years. Older revisions you might like more than this one:

@jborichevskiy
jborichevskiy / jon-roam-daily-template.md
Last active August 31, 2022 04:41
The daily template I use for Roam Research https://roamresearch.com/
  • Weekly Agenda (created on a different day, and embedded with /Block Reference)
  • [[Morning Questions]]
    • {{[[slider]]}} How many hours of sleep did I get?
    • What's one thing top of mind today?
    • What's the one thing I need to get done today to make progress?
    • Review #[[Index: Questions]] #values
  • Agenda
    • {{[[TODO]]}} Morning walk #goal-health #habit
    • {{[[TODO]]}} Check calendar for scheduled events
  • {{[[TODO]]}} Morning focus hour
@lazaronixon
lazaronixon / _form.html.erb
Last active June 6, 2025 19:24
Dropzone.js + Stimulus + Active Storage + CSS Zero (2025)
<%= form_with(model: billboard) do |form| %>
<%= tag.div class: "dropzone", data: { controller: "dropzone", dropzone_param_name_value: "billboard[images][]", dropzone_url_value: rails_direct_uploads_url, dropzone_accepted_files_value: "image/*", dropzone_max_files_value: 3, dropzone_max_filesize_value: 0.300 } do %>
<div class="dz-default dz-message flex flex-col items-center">
<%= image_tag "upload.svg", size: 28, class: "colorize-black", aria: { hidden: true } %>
<h5 class="font-semibold mbs-4">Drop files here or click to upload.</h5>
<p class="text-sm text-subtle">Upload up to 10 files.</p>
</div>
<% end %>
<div class="inline-flex items-center mbs-2 mie-1">
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active December 15, 2025 03:47
crack activate Office on mac with license file
@liangfu
liangfu / ffmpeg.md
Created May 24, 2017 04:46 — forked from protrolium/ffmpeg.md
using ffmpeg to extract audio from video files

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:

@boie0025
boie0025 / gist:ae9697eed61cbf5342a6
Last active May 17, 2017 20:20
scraper-psuedocode-exmaple
module Producers
class DataModelA
... # Some ruby magic to return the correct subclass for a state
def page
@page ||= Nokogiri.new(URL)
end
end
class SpecificState < DataModelA
@johnbintz
johnbintz / simple-capistrano-docker-deploy.rb
Last active June 6, 2025 20:51
Simple Capistrano deploy for a Docker-managed app
# be sure to comment out the require 'capistrano/deploy' line in your Capfile!
# config valid only for Capistrano 3.1
lock '3.2.1'
set :application, 'my-cool-application'
# the base docker repo reference
set :name, "johns-stuff/#{fetch(:application)}"
@amergin
amergin / angular-packery.js
Created August 6, 2014 00:24
Angular-masonry fork for Packery.js
/*!
* angular-packery
* Forked from angular-masonry (Pascal Hartig, weluse GmbH, http://weluse.de/)
*/
(function () {
'use strict';
angular.module('wu.packery', []).controller('PackeryCtrl', [
'$scope',
'$element',
'$timeout',
# config/routes.rb
resources :documents do
scope module: 'documents' do
resources :versions do
post :restore, on: :member
end
resource :lock
end
end
@gvarela
gvarela / setup
Last active May 17, 2023 15:19
A bash rails setup script to help someone get started on a rails project.
#!/usr/bin/env bash
{
RUBY_VERSION=$(cat .ruby-version)
RUBY_VERSION=${RUBY_VERSION:=2.1.0}
PROJECT_NAME=__PROJECT_NAME__
} >/dev/null 2>&1
## bootstrap function called at bottom of file comment out verification steps you don't need
init (){
verify_ruby_version &&