Skip to content

Instantly share code, notes, and snippets.

View jessestuart's full-sized avatar

Jesse Stuart jessestuart

View GitHub Profile
@Hypnoiku
Hypnoiku / pipUpgrade.sh
Last active December 25, 2018 07:59
Script to install multiple python package updates at once
#!/bin/sh
# pipUpgrade script to install multiple python package updates at once
# Compatible/tested with msys2 on Windows / Linux
#----------
# If you want to use this script in ConEmu with cmd, follow these steps (assuming both msys2 and python are already installed)
# a. Add a MSYS_HOME env variable pointing to C:\MSYS2_INSTALL_DIR\usr
# b. Add 'alias pipUpgrade=%MSYS_HOME%\bin\sh "C:\path\to\pipUpgrade.sh" $1 $2 $3' to Settings/Startup/Environment (without single quotation marks)
# c. Uncomment the following line
#PATH=$PATH:$MSYS_HOME\\bin
# d. Within ConEmu with the cmd shell, simply run 'pipUpgrade'
@renevo
renevo / nextcloud-stack.yml
Last active September 8, 2019 14:46
Nextcloud - Cloud-Init with Docker
version: '3'
volumes:
nextcloud:
services:
app:
image: nextcloud
ports:
- 80:80
@mrmrs
mrmrs / github-display-none.css
Last active November 2, 2019 03:09
Single purpose rulesets to set an element to display none from githubs production css
.table-list-triage {
display: none;
}
.triage-mode .table-list-non-triage, .triage-mode .table-list-filters {
display: none;
}
.boxed-group-list>li.approved .btn-sm, .boxed-group-list>li.rejected .btn-sm {
display: none;
}
.repo-list .participation-graph.disabled {
@markerikson
markerikson / dispatching-action-creators.js
Last active May 2, 2020 14:27
Dispatching action creators comparison
// approach 1: define action object in the component
this.props.dispatch({
type : "EDIT_ITEM_ATTRIBUTES",
payload : {
item : {itemID, itemType},
newAttributes : newValue,
}
});
// approach 2: use an action creator function
@gruber
gruber / inline2ref.rb
Created September 9, 2011 21:25 — forked from ttscoff/inline2ref.rb
Convert inline Markdown links to references
#!/usr/bin/env ruby
def e_sh(str)
str.to_s.gsub(/(?=[^a-zA-Z0-9_.\/\-\x7F-\xFF\n])/n, '\\').gsub(/\n/, "'\n'").sub(/^$/, "''")
end
def find_headers(lines)
in_headers = false
lines.each_with_index {|line, i|
if line =~ /^\S[^\:]+\:( .*?)?$/
@calkan
calkan / gist:eaad0bc4458da16a72dd
Last active January 5, 2021 02:09
Michael Hoffman's crazy bash_history backer upper on git
1 - Create a *private* GitHub/Bitbucket or similar git repo. Here I assume the repo is:
https://github.com/calkan/bash_history.git
2 - Create .history directory and initialize it for the repo:
mkdir $HOME/.history
cd $HOME/.history
git init
touch README.md
@msand
msand / svg-css-inliner-color-hexer-gradient-defs-grouper-number-formatter.js
Last active May 26, 2021 18:17
Convert Illustrator SVG export into cross-platform CSS independent mode. CSS rule and style inlining, group gradients into a definitions tag, remove elements with display set to none, make colors hex. Works with react-native-web react-native-svg and svgs to give cross-platform web and native mobile rendering of any SVG produced in Illustrator.
/*
Open console.
(Import https://raw.githubusercontent.com/MikeMcl/decimal.js/master/decimal.js first if you want/need number formatting)
Then copy & paste this + enter, to run this.
Copy console output to a NewFile.js or NewFile.jsx file.
prettier --write NewFile.js
*/
/* eslint no-console: ["error", { allow: ["log"] }] */
/* global document, Decimal*/
(() => {
@AlinaNova21
AlinaNova21 / README.md
Last active June 22, 2021 21:01
Rancher 2.0, RKE, and some Raspberry Pi 3s

Kubernetes and Arm

Getting rke and Rancher setup to run kubernetes on arm is interesting. There is no official support yet via rancher, although there is interest and some work done towards those efforts. This is my attempt at getting a cluster of 3 Pis (2 3Bs and 1 3B+) provisioned and registered to a rancher 2 server.

Prep

I've successfully completed this both with Hypriot OS 1.9.0 and the arm64 builds https://github.com/DieterReuter/image-builder-rpi64 Both times I used the same basic cloud-init setup

@tbenz9
tbenz9 / Sia Troubleshooting Megathread.md
Last active June 25, 2021 08:07
Sia Troubleshooting Megathread

Sia Troubleshooting Megathread

This document is intended to be a 'self-help' guide, if you want personal help please ask for help in the [Discord][discord] #help channel or email hello@sia.tech.

These steps may cause you to lose your existing contracts, files, and host data! Make sure you have a backup of your files, your seed and password, and the Sia configs. Make sure you understand the risks before completing any of the steps below!

Back up your Sia configurations

Your Sia configurations should be backed up in case you want to restore your previous configs. Copy the Sia-UI folder to a safe location, like in Documents, a USB drive, etc. The default location for the Sia-UI folder is:

  • Windows: Users\<user>\appdata\roaming\Sia-UI\
  • OS X: $HOME/Library/Application Support/Sia-UI/
@jukben
jukben / android_Fastlane
Last active October 28, 2021 10:51
Example of Circle CI config for React Native CI (Appcenter, Kotlin, Swift, RN 0.49+, Haul packager, signing via Match, be sure that you have set env MATCH_PASSWORD, FASTLANE_PASSWORD and SLACK_URL)
fastlane_version "2.64.1"
default_platform :android
platform :android do
lane :beta do
gradle(task: "assembleRelease")
appcenter_upload(
api_token: "",