Skip to content

Instantly share code, notes, and snippets.

View kennethgeerts's full-sized avatar
🏠
Working from home

Kenneth Geerts kennethgeerts

🏠
Working from home
View GitHub Profile
@nrc
nrc / tools.md
Last active March 8, 2025 06:01
Rust tooling

Rust developer tools - status and strategy

Availability and quality of developer tools are an important factor in the success of a programming language. C/C++ has remained dominant in the systems space in part because of the huge number of tools tailored to these lanaguages. Succesful modern languages have had excellent tool support (Java in particular, Scala, Javascript, etc.). Finally, LLVM has been successful in part because it is much easier to extend than GCC. So far, Rust has done pretty well with developer tools, we have a compiler which produces good quality code in reasonable time, good support for debug symbols which lets us leverage C++/lanaguge agnostic tools such as debuggers, profilers, etc., there are also syntax highlighting, cross-reference, code completion, and documentation tools.

In this document I want to layout what Rust tools exist and where to find them, highlight opportunities for tool developement in the short and long term, and start a discussion about where to focus our time an

@iansltx
iansltx / _safari-iframe-cookie-workaround.md
Last active February 10, 2025 12:12
Safari iframe cookie workaround
@subfuzion
subfuzion / curl.md
Last active May 8, 2025 13:29
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@mitsuru
mitsuru / aasmviz_controller.rb
Created November 23, 2017 06:54
Visualize aasm state diagram
class AasmvizController < ApplicationController
before_action :authenticate_account!
before_action :require_admin!
def index
Rails.application.eager_load!
@models = ActiveRecord::Base.descendants.select { |c| c.respond_to? :aasm }
end
def show
@andyyou
andyyou / rails_webpacker_bootstrap_expose_jquery.md
Last active August 9, 2022 07:38
Rails 5.2 with webpacker, bootstrap, stimulus starter

Rails 5.2 with webpacker, bootstrap, stimulus starter

This gist will collects all issues we solved with Rails 5.2 and Webpacker

Create Project

# Last few parameters(--skip-* part) is only my habbit not actully required
$ rails new <project_name> --webpack=stimulus --database=postgresql --skip-coffee --skip-test
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active April 8, 2025 14:18
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;
}
@elct9620
elct9620 / settings.rb
Created March 12, 2020 05:15
Simple settings model for Rails
# frozen_string_literal: true
require "singleton"
class Settings
include Singleton
class << self
delegate_missing_to :instance
end
@fractaledmind
fractaledmind / dbsnap.rake
Created September 14, 2023 11:18
A Rake namespace for working with local SQLite database snapshots
namespace :db do
namespace :snap do
task setup: :environment do
@snapshot_dir = Rails.root.join('storage/snapshots')
@db_path = ActiveRecord::Base.connection_db_config.database
@db_name = @db_path.rpartition('/').last.remove('.sqlite3')
end
task setup_snaps: :setup do
@snaps = Pathname(@snapshot_dir)