Operator Mono w/ Italics on OSX Vim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Source: https://publish.obsidian.md/jrd/Globe+Key+QMK | |
# Adding the Apple 🌐︎ key to QMK keyboards | |
Apple keyboards have a funky `fn` key with a `🌐︎` globe symbol on them. In most ways this behaves as any other `fn` key, and I've never missed it using a third-party keyboard. Generally, you could just ignore it unless you really wanted quick access to the emoji picker. This changed with macOS Sequoia. The `🌐︎` key is now the default modifier for most | |
window management shortcuts. | |
These can be remapped using `Application Shortcuts` in `System Preferences`. However, you cannot add an `fn` modifier and, without it, you often clash with common shortcuts in other applications. There's no way to avoid this and macOS will give priority to the application shortcut. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "Opening git repo" | |
giturl=$(git config --get remote.origin.url) | |
giturl=$( tr '[A-Z]' '[a-z]' <<< $giturl) | |
if [[ $giturl == *"https"* ]] | |
then | |
echo "Switching repo remote origin url from HTTPS to SSH" | |
echo $giturl | |
giturl=${giturl#https://github.com/} | |
repo=${giturl/\.git} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#blog.oscarmorrison.com | |
#Cat feeder (open and close server) | |
#change the pin, and port here. | |
from flask import Flask, jsonify | |
import RPi.GPIO as IO | |
import time | |
pinOutOne = 4 | |
#set this two whatever your 2nd servo is in | |
pinOutTwo = 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
// default font size in pixels for all tabs | |
fontSize: 12, | |
// font family with optional fallbacks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
heroku config:set `cat .env` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { line, curve, curveCatmullRom } from "d3-shape"; | |
import { scaleTime, scaleLinear } from "d3-scale"; | |
import { axisBottom, axisLeft } from 'd3-axis'; | |
import { timeParse, isoFormat } from "d3-time-format"; | |
import { select } from "d3-selection"; | |
import { extent, max, min } from "d3-array"; | |
export default { | |
line: line, | |
scaleTime: scaleTime, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getParamsFromSearchURL = url => url.slice(1).split('&').reduce((params, pairs) => { | |
const [key, value] = pairs.split('='); | |
key && value && (params[key] = getValue(value)); | |
return params; | |
}, {}); | |
// this parses foo=true -> make true a bool, not a string | |
const getValue = value => { | |
value = decodeURIComponent(value); | |
try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// regex from http://stackoverflow.com/questions/46155/validate-email-address-in-javascript | |
const EMAIL_REGEX = /^[-!#$%&'*+\/0-9=?A-Z^_a-z{|}~](\.?[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-?\.?[a-zA-Z0-9])*\.[a-zA-Z](-?[a-zA-Z0-9])+$/; | |
const validateEmail = email => { | |
return email | |
&& email.length < 255 | |
&& EMAIL_REGEX.test(email); | |
}; | |
export default validateEmail; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/4.4.2/d3.min.js"></script> | |
<script> | |
var data = [4,8,15,16,23,42]; | |
</script> | |
<style type="text/css"> |
NewerOlder