Skip to content

Instantly share code, notes, and snippets.

Avatar

JP Lomas jplomas

View GitHub Profile
View .git-qrl.sh
#!/bin/bash
git config --local user.signingkey 49C980CD2D8D21F4 && git config --local user.email jp@theqrl.org
View .git-gmail.sh
#!/bin/bash
git config --local user.signingkey B8AB109A92D4C85E && git config --local user.email jp.lomas@gmail.com
View .githook.sh
#!/bin/bash
inRepo=`git rev-parse --is-inside-work-tree 2> /dev/null;`
echo $inRepo
if [[ $inRepo != "true" ]]
then
echo 'Not in a repo'
exit 1
fi
@jplomas
jplomas / starship.toml
Last active Apr 12, 2022
Starship config
View starship.toml
# Inserts a blank line between shell prompts
add_newline = true
# Replace the "❯" symbol in the prompt with "➜"
[character] # The name of the module we are configuring is "character"
success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green"
# Disable the package module, hiding it from the prompt completely
[package]
disabled = true
@jplomas
jplomas / gen_hash.sh
Created Jan 20, 2022
Hash [shasum (512)] all files in current directory
View gen_hash.sh
for file in ./*
do
shasum -a 512 "$file" | sed 's@./@@g' >> "$file.shasum.asc"
done
@jplomas
jplomas / gmc.sh
Last active Apr 13, 2021
Shell script to validate GMC number
View gmc.sh
#!/bin/sh
if [ $# -eq 0 ]; then
echo "No argument (GMC number) provided"
exit 1
fi
RES=$(cURL -s https://www.gmc-uk.org/doctors/$1 | grep -A2 "<div class=\"c-dr-details__status-description\">" | grep -E ' {20,}' | sed -e 's/^[ \t]*//')
if [ -z "$RES" ]; then
echo "Not found"
exit 1
else
View gist:dcda0958ae5c0249913e513b967e4299
which cmake
... probably shows version 3.12.4 -- which has some breaking changed. To fix:
brew remove cmake
brew install wget
wget https://cmake.org/files/v3.10/cmake-3.10.3-Darwin-x86_64.tar.gz
tar xf cmake-3.10.3-Darwin-x86_64.tar.gz
export PATH="`pwd`/cmake-3.10.3-Darwin-x86_64/CMake.app/Contents/bin:$PATH"
which cmake
@jplomas
jplomas / pgp.asc
Created Aug 27, 2018
PGP public key -- jp@theqrl.org
View pgp.asc
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFkaEMcBEACrziClLf9lZBEa+j5w1wIw6WUOSGB9eEDnNrgB+JumpsYUcIQI
vDvAkgkxcGcgGu9W4En4fXkRJ2WPvZKd0URsyEgq7bsxBYy/LjPJUMtqd3dStDR+
6pPJq573ZL5UAOWkuxNAwLLeE1k3YZjlWQGKASB1TRvXd5XyCPortvokZ1vMZFx4
nZVrA2bVx3o5lWv8Ggv9gtqBjfwrVLs/a5VeV9pZqgAOVVtT4k/sGoAlhkmVLC0W
mz1EcFmgBK4J7HB4S2GSP3UlLaN0ADCla6Xgq9yF+s7Bmwuj3FAfbhh/VxU1hPrK
+j//Vma9SGJEgCmgL/56slyy0QBbqyRuHY0OKnY3V4g9OVCV67RDXX8Nq84+/mrw
j4jyHUZfpoalxs98kEwP9aJujDxCgZ+KZAAki1Vl94vKxbS6xvuNKQDXeG4QBYVU
zV6TNbStTNH1qD9NsYzm4TNLNwNOPLGAO+ODz1GL7HkbtodiwCq884ULv60VUBsQ
@jplomas
jplomas / Eslint QRL
Created Jul 14, 2018
Linting setup for QRL meteor.js projects
View Eslint QRL
npm install -g babel-eslint eslint-config-airbnb eslint-plugin-import eslint-plugin-meteor eslint-plugin-react eslint-plugin-jsx-a11y eslint-import-resolver-meteor eslint @meteorjs/eslint-config-meteor eslint-config-airbnb-base
@jplomas
jplomas / index.html
Created Mar 27, 2018
Validate QRL address
View index.html
<div class="ui centered grid">
<div class="row">
<div class="eight wide column">
<form class="ui form">
<h1 class="ui header">QRL Address validator</h1>
<div class="field">
<input class="ui input q" value="Q01060060d974fd1faf2c2b0c91d9e33cae9f1b42208c62169f946373ae64198b97b6479f6c8ce5"></input>
</div>
<button class="ui primary button">Check</button>
</form>