Skip to content

Instantly share code, notes, and snippets.

@Stalruth
Stalruth / Stage 2022-06-25.md
Last active March 13, 2023 03:28
The June 2022 Discord Developer Stage

Recording by @Wolfhound905

User Survey

  • Sets context for API and App updates
  • Survey was sent out to bot users
  • 60% of respondents have used Slash Commands; this went up over time
  • 50% of users say the main reason they like Slash Commands is Discoverability
    • Incl. features such as Autocomplete and Message Components
  • Top two features users struggle with
@palewire
palewire / README.md
Last active May 5, 2024 05:41
How to push tagged Docker releases to Google Artifact Registry with a GitHub Action

How to push tagged Docker releases to Google Artifact Registry with a GitHub Action

Here's how I configured a GitHub Action so that a new version issued by GitHub's release interface will build a Dockerfile, tag it with the version number and upload it to Google Artifact Registry.

Before you attempt the steps below, you need the following:

  • A GitHub repository that contains a working Dockerfile
  • The Google Cloud SDK tool gcloud installed and authenticated

Create a Workload Identity Federation

@ChristopherA
ChristopherA / brew-bundle-brewfile-tips.md
Last active May 5, 2024 13:25
Brew Bundle Brewfile Tips

Brew Bundle Brewfile Tips

Copyright & License

Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ©️2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.

Sponsor

If you more tips and advice like these, you can become a monthly patron on my GitHub Sponsor Page for as little as $5 a month; and your contributions will be multipled, as GitHub is matching the first $5,000! This gist is all about Homebrew, so if you like it you can support it by donating to them or becoming one of their Github Sponsors.

@niksumeiko
niksumeiko / git-checkout-their-remote-branch-ohmyzsh-alias.zsh
Last active November 10, 2021 06:29
Git checkout remote branch · ohmyzsh custom alias
# ~/.oh-my-zsh/custom/git-checkout-remote-branch-ohmyzsh-alias.zsh
unalias gcor
function gcor() {
if [ -n "$1" ]; then
if git show-ref -q --heads $1; then
gco $1
else
gfo $1
gco -t origin/$1
fi
@CarsonBain
CarsonBain / shopify-line-item-props.md
Last active June 12, 2023 21:24
Adding Line Item Properties for Personalization to your Shopify Site

Adding line item properties for personalization to your Shopify site

For some products in your store, you may want to capture other form-like information from the customer such as custom monogram/engraving text or a choice of colour in which inventory doesn't need to be kept. These fields are called line item properties and can be used to allow customers to make choices or add information about a product.

This post will take you through how to add line item properties to a new product page template, as well as how to make the names of these new properties customizable by adding them as Theme Settings. By the end of this post, you will have a product page with custom required inputs for colour and an optional monogram that will look something like this:

Creating an alternate product page template

@NicholasJacques
NicholasJacques / Jwt_authentication_rails.markdown
Last active June 1, 2023 03:55
JWT authentication in rails using jwt gem and bcrypt

Handroll JWT Authentication for your Rails API because no on likes using Devise

The Problem:

If you’re new to building API’s with Rails you’ve probably wondered how to authenticate requests made to the API to ensure that they are coming from the correct source with correct permissions. Since API’s are stateless applications they do not have the ability to create sessions for users. (Read about how Rails Sessions work here) This creates some challenges when trying to handle authentication because the app isn’t able to remember a user’s session data from one request to the next.

The Solution:

Enter Json Web Tokens. Json Web Tokens (JWT) are a self contained authentication method designed for stateless authentication. A self contained authentication method is one that does not require any storage on the back-end to verify the authenticity of the request. All of the data necessary to authenticate the request is contained right inside the token!

What does a JWT look like?

@attacus
attacus / riot-matrix-workshop.md
Last active March 13, 2024 00:16
Create your own encrypted chat server with Riot and Matrix

This guide is unmaintained and was created for a specific workshop in 2017. It remains as a legacy reference. Use at your own risk.

Running your own encrypted chat service with Matrix and Riot

Workshop Instructor:

This workshop is distributed under a CC BY-SA 4.0 license.

What are we doing here?

@stewartknapman
stewartknapman / shopify-money.js
Created February 27, 2017 23:25
The Shopify.formatMoney method extracted from option_selection.js for stand-alone purposes.
var Shopify = Shopify || {};
// ---------------------------------------------------------------------------
// Money format handler
// ---------------------------------------------------------------------------
Shopify.money_format = "${{amount}}";
Shopify.formatMoney = function(cents, format) {
if (typeof cents == 'string') { cents = cents.replace('.',''); }
var value = '';
var placeholderRegex = /\{\{\s*(\w+)\s*\}\}/;
var formatString = (format || this.money_format);
@christophermoura
christophermoura / itunes-podcast-url-extractor.php
Created January 13, 2017 16:47
iTunes Podcast URL Extractor
<?php
/*
* Podcast URL Extractor
* implemented at http://itunes.so-nik.com
*
* All code has been re-written by lasavior.
* Original code & inspiration from Michael Sitarzewski, zerologic.com
*
* Ex: http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStore.woa/wa/viewPodcast?id=269238657
@matthewtole
matthewtole / gcolor.js
Created February 26, 2015 23:39
GColor utilities for PebbleKit JS
/*
GColor
A small utility library for dealing with GColor in the new PebbleSDK.
----------------------
The MIT License (MIT)
Copyright © 2015 Matthew Tole
Permission is hereby granted, free of charge, to any person obtaining a copy