Skip to content

Instantly share code, notes, and snippets.

View medicationforall's full-sized avatar

James Adams medicationforall

View GitHub Profile
@marcus7070
marcus7070 / cq-internal-example.md
Last active January 30, 2023 23:15
CQ internals example

To see a bit more about how the internals of CadQuery work, let's mokeypatch some more verbose string represenations and create a simple model.

import cadquery as cq


def _ctx_str(self):
    return (
        f"CQContext object with id: {id(self)}\n"
        + f"    pendingWires: {self.pendingWires}\n"
@ebidel
ebidel / fancy-tabs-demo.html
Last active March 8, 2024 23:08
Fancy tabs web component - shadow dom v1, custom elements v1, full a11y
<script src="https://unpkg.com/@webcomponents/custom-elements"></script>
<style>
body {
margin: 0;
}
/* Style the element from the outside */
/*
fancy-tabs {
margin-bottom: 32px;
@adactio
adactio / yourdomain.com.conf
Last active December 13, 2016 13:48
HTTPS domain settings on Apache 2.4.7: https://adactio.com/journal/10727
<VirtualHost *:80>
ServerAdmin you@yourdomain.com
ServerName yourdomain.com
ServerAlias www.yourdomain.com
DocumentRoot /path/to/yourdomain
Redirect / https://yourdomain.com/
</VirtualHost>
<VirtualHost *:443>
ServerAdmin you@yourdomain.com
@paulirish
paulirish / bling.js
Last active May 1, 2024 19:56
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@joyrexus
joyrexus / README.md
Last active May 3, 2024 10:41 — forked from liamcurry/gist:2597326
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})