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 December 26, 2024 14:07
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 November 22, 2024 20:26
bling dot js
/* bling.js */
window.$ = document.querySelector.bind(document);
window.$$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function(name, fn) { this.addEventListener(name, fn); };
NodeList.prototype.__proto__ = Array.prototype;
NodeList.prototype.on = function(name, fn) { this.forEach((elem) => elem.on(name, fn)); };
@joyrexus
joyrexus / README.md
Last active November 5, 2024 14:17 — forked from liamcurry/gist:2597326
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

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