Skip to content

Instantly share code, notes, and snippets.

View chrisbraddock's full-sized avatar

Chris Braddock chrisbraddock

View GitHub Profile
@mfehrenbach
mfehrenbach / chrome-device-dimensions.md
Last active June 7, 2024 18:17
Modern device dimensions for Chrome DevTools.

Modern Device Dimensions for Chrome DevTools

These are modern “Emulated Devices” (a.k.a. responsive dimensions) for Chrome DevTools’ Mobile Device Viewport Mode.

They are specifically Apple devices, subtracting for recent Safari UI (as in window.innerWidth/Height), and cleverly sorted with some dark-arts unicode shenanigans. (This glitchy, unloved portion of the tools sorts lexicographically, because of course it would.) Ergonomics!

before-after

Nest Hub Max? Come on. I dropped a bunch of devices that were older and/or close to these dimensions. It obviously doesn’t cover everything (sorry Android/Chrome), but offers a decent spread/increments for common 2023/2024 viewports.

@rob-hills
rob-hills / ubuntu-22.04-mbp-a1707.md
Last active June 15, 2024 20:56
Ubuntu 22.04 on MacBook Pro 2017 (A1707, MBP 14,3)

Summary

Random set of notes and links that have helped me in the saga to get Ubuntu 22.04 up and running on my 2017 MacBook Pro These notes are mainly for myself in the event that I have to do this again some day. But if you find them helpful, that's great.

Important update

Unfortunately the MacBookPro that I bought second hand turned out to be a dud with some serious hardware flaws that didn't show up until a couple of months after I'd bought it.

I've since purhcased another laptop so I'm not going to be able to maintain this GIST.

I'll leave it here for now in case others want to contribute updates, or clone it. If you feel it's out of date or misleading or a waste of time, let me know in the comments and I'll remove it.

@praveenpuglia
praveenpuglia / shadow-dom.md
Last active March 28, 2024 15:06
Everything you need to know about Shadow DOM

I am moving this gist to a github repo so more people can contribute to it. Also, it makes it easier for me to version control.

Please go to - https://github.com/praveenpuglia/shadow-dom-in-depth for latest version of this document. Also, if you find the document useful, please shower your love, go ⭐️ it. :)

Shadow DOM

Heads Up! It's all about the V1 Spec.

In a nutshell, Shadow DOM enables local scoping for HTML & CSS.

const marky = require('marky')
const render = Vue.prototype._render
const update = Vue.prototype._update
const camelize = str => str && Vue.util.camelize(str)
function getName (vm) {
if (!vm.$parent) return 'root'
return (
camelize(vm.$options.name) ||
camelize(vm.$options._componentTag) ||
@deltaepsilon
deltaepsilon / rxjs-firebase-demo.js
Created September 8, 2016 17:44
Demo RxJs integration with Firebase
var Rx = require('rxjs');
var firebase = require('firebase');
firebase.initializeApp({
"databaseURL": "https://quiver-two.firebaseio.com",
"serviceAccount": "./service-account.json"
});
var ref = firebase.database().ref('rxjs-demo');
Rx.Observable.fromPromise(ref.remove())
.map(function () {
@imjasonh
imjasonh / markdown.css
Last active May 24, 2024 22:56
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@brianclements
brianclements / Commit Formatting.md
Last active June 28, 2024 16:12
Angular Commit Format Reference Sheet

Commit Message Format

This specification is inspired by and supersedes the [AngularJS commit message format][commit-message-format].

We have very precise rules over how our Git commit messages must be formatted. This format leads to easier to read commit history.

Each commit message consists of a header, a body, and a footer.

@marketcalls
marketcalls / Supertrend V1.0 - Pinescript
Created December 18, 2014 09:42
Supertrend V1.0 - Pinescript
study("Supertrend V1.0 - Marketcalls", overlay = true)
Factor=input(3, minval=1,maxval = 100)
Pd=input(7, minval=1,maxval = 100)
Up=hl2-(Factor*atr(Pd))
Dn=hl2+(Factor*atr(Pd))
@chrisbraddock
chrisbraddock / large-xfer.sh
Last active October 31, 2016 11:58
transfer large amount of files - e.g. a large multi-terabyte directory with many subdirectories between physical drives
# -f If the destination file cannot be opened, remove it and create a new file, without
# prompting for confirmation regardless of its permissions. (The -f option overrides
# any previous -n option.)
# -p Cause cp to preserve the following attributes of each source file in the copy: mod-
# ification time, access time, file flags, file mode, user ID, and group ID, as
# allowed by permissions. Access Control Lists (ACLs) and Extended Attributes (EAs),
# including resource forks, will also be preserved.
#
# If the user ID and group ID cannot be preserved, no error message is displayed and
# the exit value is not altered.