Skip to content

Instantly share code, notes, and snippets.

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

Benjamin bsurrey

🏠
Working from home
View GitHub Profile
@ayoubzulfiqar
ayoubzulfiqar / folder_structure.md
Created September 5, 2023 06:12
The Folder Structure for Every Golang Project

Go - The Ultimate Folder Structure

Organizing your Go (Golang) project's folder structure can help improve code readability, maintainability, and scalability. While there is no one-size-fits-all structure, here's a common folder structure for a Go project:

project-root/
    ├── cmd/
    │   ├── your-app-name/
    │   │   ├── main.go         # Application entry point
    │   │   └── ...             # Other application-specific files
@RobertAKARobin
RobertAKARobin / safari.md
Last active December 5, 2024 01:38
Safari's date-picker is the cause of 1/3 of our customer support issues

Safari's date-picker is the cause of 1/3 of our customer support issues

...and obviously we're building a workaround. But I'm absolutely flabbergasted that a standard <input type="date"> HTML field, in a standard browser, from a company that bases its reputation good design, could be so dreadful.

The context

I'm the developer for a startup that sells a genetic test to recommend medications for high blood pressure. For medical reasons we need to know our customers' birth date. Most of our customers are in their 60s or older. We've found that many of them use iPads or iPhones. And they're the ones who complain to our customer support that our site is unusable.

The problem

@benmarsh
benmarsh / gist:873a37bffd06d3150ed10b33e90352ab
Last active May 13, 2023 10:55
Install ImageMagick on Laravel Valet with PHP 7.4
# Upgrade to PHP 7.4
brew update
brew upgrade php
# Update Valet
valet on-latest-version
@uroboro
uroboro / Apple8723Container.c
Last active November 14, 2024 21:50
iPod Nano 6g jailbreak?
// Todo
@mishterk
mishterk / custom-wordpress-menu-items-template.php
Last active December 25, 2024 16:19
How to render WordPress menu items without a custom walker
<?php $menu_location = 'some_menu_location'; ?>
<?php if ( has_nav_menu( $menu_location ) ): ?>
<?php $menu_items = wp_get_nav_menu_items( wp_get_nav_menu_name( $menu_location ) ); ?>
<?php foreach ( $menu_items as $menu_item ): ?>
<a href="<?= esc_url( $menu_item->url ) ?>"
target="<?= esc_attr( $menu_item->target ?: '_self' ) ?>"
@ww9
ww9 / gist_markdown_examples.md
Last active March 27, 2025 10:42
Gist markdown examples

Gist markdown examples

A collection of Markdown code and tricks that were tested to work in Gist.

This and all public gists in https://gist.github.com/ww9 are Public Domain. Do whatever you want with it including , no need to credit me.

Todo

  • Reformat this whole document and assimilate these:
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active May 3, 2025 05:29
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@mattrude
mattrude / mdr-table-of-contents.less
Created November 19, 2012 05:40
Table of Contents shortcode for WordPress
// Creates a small boarder around the table.
.table_of_contents.fl {
float: right;
margin: 0 0 15px 15px;
padding: 5px;
border: 1px solid #AAA;
}