Skip to content

Instantly share code, notes, and snippets.

Avatar

Brett Kelly brettkelly

View GitHub Profile
View embed.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
body,
html {
@brettkelly
brettkelly / vimeoPlayback.js
Last active Aug 26, 2021
Ad-hoc store/load playback position for embedded Vimeo players
View vimeoPlayback.js
/*
To Do:
1. Deal with multiple iframes. Don't just match the element type and assume it's a player.
2. Deal with multiple embedded players?
3. Handle a page close/reload event during playback
*/
var iframe = document.querySelector("iframe");
if (!iframe) {
console.log("No Vimeo player found");
} else {
@brettkelly
brettkelly / testimonial.css
Created Jun 4, 2021
Add quotation mark image to testimonial
View testimonial.css
selector::before {
content:"";
background-image:url('foo.svg');
position:absolute;
top:0;
left:2;
opacity:0.3;
}
selector::after {
View Using Git to Manage a Live Web Site.md

Using Git to Manage a Live Web Site

Overview

As a freelancer, I build a lot of web sites. That's a lot of code changes to track. Thankfully, a Git-enabled workflow with proper branching makes short work of project tracking. I can easily see development features in branches as well as a snapshot of the sites' production code. A nice addition to that workflow is that ability to use Git to push updates to any of the various sites I work on while committing changes.

Contents

@brettkelly
brettkelly / README.md
Last active Feb 19, 2021 — forked from lopspower/README.md
Hexadecimal color code for transparency
View README.md

Hexadecimal color code for transparency

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

All hex value from 100% to 0% alpha:

  • 100% — FF
View pethemes.csv
Site Theme Version
https://montoursolar.com ronneby_child 1.0.0
https://patternenergynewmexico.com Divi 4.0.11
https://crystalriversolar.com ronneby_child 1.0.0
https://heritageprairierenewable.com dfd-ronneby 3.2.0
http://cmw.patternmicro.site ronneby_child 1.0.0
http://crs.pattermicro.site ronneby_child 1.0.0
https://oldjacksonsolartexas.com dfd-ronneby 3.2.0
https://southerncrosstransmission.com ronneby_child 1.0.0
http://hickory.patternmicro.site dfd-ronneby 3.2.0
View foo.html
This is a another test.
@brettkelly
brettkelly / grayblur.sh
Created Feb 12, 2020
Grayscale and blur an image
View grayblur.sh
#!/bin/bash
filename=$(basename -- "$1")
extension="${filename##*.}"
plain="${filename%.*}";
newfile="${plain}.blurred.${extension}";
convert ${filename} -blur 0x4 -set colorspace Gray -separate -average ${newfile}
View getVimeoThumb.sh
# One-liner to download the thumbnail for a Vimeo video.
wget $( curl -s http://vimeo.com/api/oembed.json?url='https://vimeo.com/235215203' | python -c "import sys,json; print json.load(sys.stdin)['thumbnail_url']" )
View coffee.java
Coffee coffee = new Coffee();
if(coffee.Empty) {
coffee.Refill();
}
coffee.Drink();