Skip to content

Instantly share code, notes, and snippets.

View jrsmith3's full-sized avatar

Joshua Ryan Smith jrsmith3

View GitHub Profile
@jdkanani
jdkanani / notepad.html
Last active June 16, 2024 13:44 — forked from jakeonrails/Ruby Notepad Bookmarklet
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">.e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div class="e" id="editor"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("editor");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
<!--
For other language: Instead of `ace/mode/ruby`, Use
Markdown -> `ace/mode/markdown`
Python -> `ace/mode/python`
C/C++ -> `ace/mode/c_cpp`
Javscript -> `ace/mode/javascript`
Java -> `ace/mode/java`
Scala- -> `ace/mode/scala`
@bede
bede / install-sci-py-osx
Last active December 25, 2015 02:48
Install scientific Python (inc. IPython) on virgin Mac OS X 10.8
## Prerequisites
# Latest Xcode
# Latest Apple command line utilities
# Homebrew (check 'brew doctor')
# 20+ minutes (new machine with SSD – hours on our lab's 2008 Mac Pro)
## Commands (instead install scipy superpack?)
brew install python # Symlinking may well be problematic – use 'brew link --overwrite python' if necessary)
pip install virtualenv
pip install virtualenvwrapper
@duretti
duretti / pull_request_template.md
Last active August 3, 2016 18:04
Pull request template

Overview

Here, you might lay out the reasons behind writing this code. You can link to specs, issues, or bugs in order to give someone a better idea of how a decision was made. This is your chance to give context to your reviewer. Ego depletion - the idea that willpower is used up over time - can be easily applied to your reviewer. We are human, after all. You'll likely get one shot at a quality review, so help your reviewer help you. Flush out this section.

Testing

How did you test this code? Did you write a unit test, or test it manually? Can you provide an animated gif or a screenshot to demonstrate your code does what it purports to do? What about test output or a useful snippet from a logfile? Help show that your code works.

🚨🚨🚨 (Risks)

Is there some part of the code that you know probably doesn't work as it should? Call out potential weak spots, and get help addressing them.

Conda packages contain a metadata file (index.json) which provides information about the package and the software contained within. The metadata for all packages within a channel are combined into a single json file (repodata.json) which is used by conda for package discovery and to resolve and verify dependencies when a package is installed or removed from an environment.

Unfortunately, the metadata contained within a package may be incorrect, either because of a mistake made when the package was created or because new information makes the original metadata incomplete.

@darwin
darwin / readme.md
Last active April 9, 2024 22:30
APFS Container cloning/replicating under Catalina (with a bootable system)

Today I wanted to move existing APFS-resident macOS Catalina installation to a new disk. I upgraded my late 2014 Mac Mini with a shiny new 1TB SSD. This took way too many hours of my life I will never get back. Hope this saves some time to you.

Good news:

  1. it is possible to create a DMG image from existing APFS container with macOS Catalina installation including metadata needed for complete restore (the DMG contains OS, OS Data, Preboot, Recovery and VM volumes)
  2. it is possible to restore this DMG image into empty APFS container and get a bootable copy of the original system

This information is relevant for Catalina (I'm currently running macOS 10.15.1).

@me-vlad
me-vlad / Ansible_Vault_passwordstore.md
Last active July 28, 2021 19:01
Ansible Vault passwords and ansible_become_pass variable stored in pass (https://www.passwordstore.org) or gopass

Ansible Vault passwords and ansible_become_pass variable stored in pass https://www.passwordstore.org or gopass https://www.gopass.pw

ansible_become_pass variable in pass/gopass

Create encrypted password file with pass or gopass

pass insert ansible/test or gopass insert ansible/test

Now you can access become password stored in ansible/test using lookup plugin passwordstore