Skip to content

Instantly share code, notes, and snippets.

View jryio's full-sized avatar
☣️
Test your code

Jacob (JRY) jryio

☣️
Test your code
  • Colorado / New York
  • 00:42 (UTC -06:00)
View GitHub Profile
@jryio
jryio / Cargo.toml
Last active August 21, 2023 18:05
Recurse - Tic Tac Toe - Jacob Young
[package]
name = "recurse-tic-tac-toe"
version = "0.1.0"
edition = "2021"
authors = ["Jacob Young <crates@jry.io>"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[[bin]]
name = "tictactoe"
inoremap <silent><expr> <TAB>
\ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? "\<TAB>" :
\ coc#refresh()
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
" Use <cr> to confirm completion, `<C-g>u` means break undo chain at current position.
" Coc only does snippet and additional edit on confirm.
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
" Use `[g` and `]g` to navigate diagnostics
nmap <silent> [g <Plug>(coc-diagnostic-prev)
@jryio
jryio / LICENSE
Last active August 25, 2018 01:19
Disable All Retweets on Twitter
MIT License
Copyright (c) 2018 Jacob Young
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@jryio
jryio / remove-non-gdoc-files.sh
Created July 11, 2016 19:01
For migrating from Google Drive to another service, delete all files from Google Drive which are not Google Doc or Google Sheet files.
find . -type f \! \( -name "*.gdoc" -o -name "*.gsheet" \) -print -exec rm -rf {} +
@jryio
jryio / Prepend YAML Front Matter to Markdown Files
Last active July 12, 2023 12:06
Adding YAML front matter to markdown files (title)
# For each result of find call our script to run on the filename
$ find . -name "*.md" -print0 | xargs -0 -I file ./prepend.sh file
@jryio
jryio / assembly_formatter.sh
Last active December 8, 2015 07:28
Formatting assembly comments using Bash
#!/bin/bash
#
# Programmer: Jacob Young
# Filename: comments.sh
# Date: Mon Dec 7 2015
# Class: COSMC-171
#
# Assignment 1
# This script will align comments in an assmebly language file
# Lines which start with a comment (;) will not be modified
@jryio
jryio / new-tab.js
Created December 5, 2015 09:20
Using JavaScript to open links (not within the host site) in a new tab
// Adds attribute "target=_blank" to links to all external sites
function handleExternalLinks () {
var host = location.host
var allLinks = document.querySelectorAll('a')
forEach(allLinks, function (elem, index) {
checkExternalLink(elem, host)
})
}
function checkExternalLink (item, hostname) {
#!/bin/sh
#
#
# This pre-push hook will automatically pull the _posts submodule.
# _posts submodule will be behind its master branch unless pulled
# in this repository.
echo "_posts submodule has been pulled"
exec git submodule foreach git pull origin master
@jryio
jryio / remote-repo.sh
Last active November 10, 2015 19:01 — forked from robwierzbowski/gitcreate.sh
Create and push to a new github repo from the command line using the Github API. thebearjew modifications
#!/bin/bash
# https://gist.github.com/robwierzbowski/5430952/
# Create and push to a new github repo from the command line.
# Grabs sensible defaults from the containing folder and `.gitconfig`.
# Refinements welcome.
# Gather constant vars
CURRENTDIR=${PWD##*/}
GITHUBUSER=$(git config github.user)
var textBox = document.querySelector('.control input');
var ship = document.querySelector('.ship');
var button = document.querySelector('.control button');
var commandEntered = function(event) {
event.preventDefault();
var text = textBox.value;
textBox.value = '';
var words = text.split(' ');