Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View rshipp's full-sized avatar
🍉
drop ICE. defund police.

Ryan Shipp rshipp

🍉
drop ICE. defund police.
View GitHub Profile
@lizthegrey
lizthegrey / attributes.rb
Last active February 24, 2024 14:11
Hardening SSH with 2fa
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
@killthekitten
killthekitten / persistent_csrf_token_cookie.rb
Last active October 6, 2021 17:12
Persistent CSRF token cookie
@raghubetina
raghubetina / lti_rails_engine_template.rb
Created July 15, 2016 14:00 — forked from coderberry/lti_rails_engine_template.rb
Rails template for creating LTI apps (as mountable rails engines)
# rails plugin new my_lti_app -T --mountable --dummy-path=spec/test_app -m URL_TO_THIS_RAW_GIST
def ask_wizard(question)
ask "\033[1m\033[30m\033[46m" + "prompt".rjust(10) + "\033[0m\033[36m" + " #{question}\033[0m"
end
def yes_wizard?(question)
answer = ask_wizard(question + " \033[33m(y/n)\033[0m")
case answer.downcase
when "yes", "y"
[Unit] Description=Copy EFISTUB Kernel to UEFISYS Partition
[Path]
PathChanged=/boot/initramfs-linux-fallback.img
[Install]
WantedBy=multi-user.target
WantedBy=system-update.target
@rshipp
rshipp / hbuild.sh
Created May 14, 2016 21:53
Haskell helper
#!/bin/bash
name=$1
version=$(wget http://hackage.haskell.org/package/$name -qO- | grep Change\ log | sed 's,^.*<strong>\([0-9\.]*\)</strong></td></tr><tr><th>Change.*$,\1,')
echo Building $name-$version
cp -R haskell-conduit haskell-$name
cd haskell-$name
sed -i s/conduit/$name/g PKGBUILD
@Ram-Z
Ram-Z / socheck
Created December 11, 2015 23:48
#!/bin/bash
version="0.1"
function usage ()
{
echo "Usage : $0 [options] [PATH]
Checks installed libraries for missing dynamic links.
Options:
@rshipp
rshipp / notes.sh
Created September 25, 2015 11:44
take daily encrypted notes
#!/bin/bash
# take notes
IDENT= # put your gpg key id (email) here
NOTES_DIR=~/.n
TMP_DIR=/dev/shm/.n
GPG=gpg
mkdir -p "$NOTES_DIR" || exit $?
@anthonykasza
anthonykasza / search.sh
Created September 14, 2015 01:10
A basic BASH script for searching Github for new and interesting repos
if [ -z ${1+x} ]; then
printf "usage: search.sh terms.txt\n\n";
exit -1;
fi
DT=$(date '+%Y-%m-%d' --date="yesterday")
RESULTS_DIR="./results"
EMAIL=""
if [ ! -d "${RESULTS_DIR}" ]; then
@rshipp
rshipp / forvo_scraper.sh
Last active March 23, 2023 12:17
Scrape the highest rated MP3 from Forvo.com for a given word
#!/bin/bash
# Forvo scraper
language=${FORVO_LANG:-fr}
BASEURL="http://forvo.com/search/"
AUDIOURL="http://audio.forvo.com/mp3/"
word=$1
if [[ -z $word ]]; then
echo "usage: "
echo "FORVO_LANG=languagecode ./forvo_scraper.sh myword"
@rshipp
rshipp / bettysh
Created April 8, 2015 02:18
An interactive shell for Betty - https://github.com/pickhardt/betty
#!/bin/bash
# interactive betty shell
BETTYSH_PS1=${BETTYSH_PS1:-betty$ }
install_betty() {
echo "==> Installing betty..."
git clone https://github.com/pickhardt/betty ~/.betty || return $?
echo "==> Done."
}