Skip to content

Instantly share code, notes, and snippets.

View invalidusrname's full-sized avatar
🤷‍♀️

Matt invalidusrname

🤷‍♀️
View GitHub Profile
@invalidusrname
invalidusrname / mermaid.md
Created January 7, 2023 03:08 — forked from martinwoodward/mermaid.md
GitHub HTML Rendering Pipeline
```mermaid
sequenceDiagram
    participant dotcom
    participant iframe
    participant viewscreen
    dotcom->>iframe: loads html w/ iframe url
    iframe->>viewscreen: request template
    viewscreen->>iframe: html & javascript
 iframe->>dotcom: iframe ready
@invalidusrname
invalidusrname / install_dash_gem_docs.rb
Created August 26, 2020 12:23 — forked from jasonnoble/install_dash_gem_docs.rb
Installs the Dash docs for all the Ruby Gems in your Gemfile
#!/usr/bin/env ruby
#
# Prerequisites:
# gem install bundler
# bundle install
dependencies = `bundle show | grep '*' | awk '{print $2, $3}' | sed -e 's/(//' -e 's/)//'`.split("\n")
dependencies.each do |dependency|
(gem_name, version) = dependency.split
def get_collections(skuNo):
db = Database.Database('rugsystem_new')
db.local.execute("SELECT * FROM rugsystem_new.ul_skus US LEFT JOIN rugsystem_new.ul_designs UD ON US.design_id = UD.id LEFT JOIN rugsystem.ul_collections UC ON UD.collection_id = UC.id WHERE US.SkuNo = {}".format(int(skuNo)))
collect = {}
return collect
@invalidusrname
invalidusrname / create_labels.sh
Created September 28, 2017 13:27 — forked from MatthiasKunnen/create_labels.sh
Create Gtihub labels from Bash
#!/usr/bin/env bash
# Colours picked from https://robinpowered.com/blog/best-practice-system-for-organizing-and-tagging-github-issues/
###
# Label definitions
###
declare -A LABELS
# Platform
@invalidusrname
invalidusrname / 0_reuse_code.js
Created September 27, 2017 18:39
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@invalidusrname
invalidusrname / create_labels.sh
Created March 9, 2017 21:52 — forked from Chompas/create_labels.sh
Bash script to create multiple Github labels at once
#!/usr/bin/env bash
# This is a modification from https://gist.github.com/omegahm/28d87a4e1411c030aa89
# Colours and convention picked from https://robinpowered.com/blog/best-practice-system-for-organizing-and-tagging-github-issues/
## Instructions
# Bash 4+ is needed because of associative arrays
# jq (https://stedolan.github.io/jq/)
# Create access Token from Github (https://help.github.com/articles/creating-an-access-token-for-command-line-use/) and save it under ".token" file
# Comment / Uncomment / Add, all the labels you want
@invalidusrname
invalidusrname / download_rubytapas.rb
Last active April 3, 2019 15:08 — forked from xpepper/download_rubytapas.rb
Old way of downloading rubytapas videos
username = ARGV[0]
pwd = ARGV[1]
target_path = ARGV[2]
unless ARGV.size == 3
puts "usage: ruby download_rubytapas.rb username password save_path"
exit(1)
end
target_path = File.expand_path(target_path)
@invalidusrname
invalidusrname / resque-recovery.sh
Created August 7, 2012 14:16 — forked from vitobotta/resque-recovery.sh
Resque: automatically kill stuck workers and retry failed jobs
#!/bin/bash
set -e
TIMEOUT_PERIOD=600
EMAIL_ADDRESS="your@email.com"
# Updated to make use of timeout and email variables
# Also see: http://vitobotta.com/resque-automatically-kill-stuck-workers-retry-failed-jobs/