Skip to content

Instantly share code, notes, and snippets.

View conatus's full-sized avatar

Alex Worrad-Andrews conatus

View GitHub Profile
@hhhonzik
hhhonzik / deploy.yml
Last active April 22, 2024 10:30
Kinsta Deployment
# Kinsta Deployment through Github Actions for Bedrock/Sage.
#
# Placed at: .github/workflow/deploy.yml
#
# Process should be studied from code, but some quick brief:
# - runs composer / sage installation
# - moves correct `.env.*` file for multiple configs
# - uses rsync to sync files, uses /.rsyncignore file to exclude whatever should not be there
# - symlinks uploads folder and symlink release folder to kinsta public hostname
# - if you want to clear cache, please uncomment the last job
@vincentorback
vincentorback / .deploy
Created September 7, 2020 08:50
Github Action - Deploying Bedrock WordPress website
name: Build and deploy
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
@tatianamac
tatianamac / tatiana-mac-speaker-rider.md
Last active July 24, 2024 16:36
Tatiana Mac's Speaker Rider

Speaker Rider

by Tatiana Mac

Last updated 14 April 2021

What is a speaker rider?

As speaking comes with immense privilege, I have crafted a speaker rider to set expectations and boundaries around my engagement. I am grateful to all the conference organisers who have brilliantly hosted me. I would love to continue to exercise this privilege to speak at conferences, and use this privilege to make the landscape more accessible and beneficial to tech's most historically excluded and marginalised communities.

Considerations

😫 I provide a lot of explanations for those of you who never had to consider these things. Most thoughtful conferences I've attended check most of these boxes intrinsically, particularly when conference runners are experienced speakers. They get it.

We don't use that word here

There are some words which carry with them the baggage of sexism and ableism and so they're words we've chosen to avoid using within our community.

We realise that sometimes SlackBot might get a bit over-eager and correct you when you intentionally chose that word and it is appropriate. That's okay, but we find that in most cases, SlackBot's reminders help us choose our words with intention and promote a more inclusive and welcoming space.

There are plenty of other words that you can use which can still convey the meaning you're looking for. Sometimes it might require a bit of creativity, but trust us – it can be done.

We don't assume you were intentionally being sexist or ableist. Our language is littered with the legacy of unfortunate cultural baggage. You might not even believe that there's a problem with the word you used. That's cool, but we don't use that word here.

@fakedarren
fakedarren / MNM.md
Last active January 13, 2019 08:22

mynearestmarginal.com stats

Some stats from mynearestmarginal.com.

I've shared this because it gives an unfiltered insight into what devices and browsers are used by Momentum's demographic. I would assume that this matches the demographic a lot of startups also target. That's an assumption on my part though.

Uses Node, Express, Handlebars for backend. jQuery and Google Maps for front end. MongoDB for database (and crucially geospatial search). Cloudflare and Heroku for hosting / scaling.

Browsers

'use strict';
class Abstract {
// A static abstract method.
static foo() {
if (this === Abstract) {
// Error Type 2. Abstract methods can not be called directly.
throw new TypeError("Can not call static abstract method foo.");
} else if (this.foo === Abstract.foo) {
// Error Type 3. The child has not implemented this method.
throw new TypeError("Please implement static abstract method foo.");
@zcaceres
zcaceres / Include-in-Sequelize.md
Last active July 27, 2024 13:21
using Include in sequelize

'Include' in Sequelize: The One Confusing Query That You Should Memorize

When querying your database in Sequelize, you'll often want data associated with a particular model which isn't in the model's table directly. This data is usually typically associated through join tables (e.g. a 'hasMany' or 'belongsToMany' association), or a foreign key (e.g. a 'hasOne' or 'belongsTo' association).

When you query, you'll receive just the rows you've looked for. With eager loading, you'll also get any associated data. For some reason, I can never remember the proper way to do eager loading when writing my Sequelize queries. I've seen others struggle with the same thing.

Eager loading is confusing because the 'include' that is uses has unfamiliar fields is set in an array rather than just an object.

So let's go through the one query that's worth memorizing to handle your eager loading.

The Basic Query

@MichaelLawton
MichaelLawton / deleteAmazonSavedItems.js
Last active August 21, 2024 06:24
Removes all Amazon saved for later items on the cart page. It will only remove visible items. You might want to scroll first to make more items visible. To use paste code in developer console (Ctrl+Shift+J or Cmd+Opt+J in Chrome) then press enter.
function deleteSavedItems() {
var query = document.querySelectorAll("#sc-saved-cart input[value=Delete]")
if (query.length) {
query[0].click();
}
if (query.length > 1) {
setTimeout(deleteSavedItems,100);
}
else {
console.log('Finished');
@bholzer
bholzer / bucket_encrypter.rb
Last active May 2, 2018 22:19
Encrypt existing objects in S3 bucket.
#!/usr/bin/env ruby
#
# Script to encrypt the contents of an entire S3 bucket
#
# This works by copying each object in the bucket onto
# itself while modifying its server_side_encryption attribute
#
#
##############################################################
@jessfraz
jessfraz / go-release-stats.md
Last active March 9, 2019 02:32
stats on the go 1.7 release for fun

Setup:

# set CONTRIBUTORS file to mailmap to remove duplicate emails for the same name
# see: https://git-scm.com/docs/git-shortlog#_mapping_authors
$ git config mailmap.file CONTRIBUTORS

Top 10 contributors (all):