Skip to content

Instantly share code, notes, and snippets.

View chrsmlls333's full-sized avatar

Chris Mills chrsmlls333

View GitHub Profile
@aelk00
aelk00 / remove-likes.md
Last active March 1, 2024 00:58
Remove all your facebook likes
@freshyill
freshyill / .eleventy.js
Last active April 13, 2022 14:38
YouTube Editor component for Netlify CMS
module.exports = function(eleventyConfig) { // This only happens once in your template!
// Blah blah, whatever other Eleventy stuff you need.
eleventyConfig.addLiquidShortcode("youtube", (youtubeId, aspectRatio) => {
return `<div class="aspect-ratio" style="--aspect-ratio: ${aspectRatio}"><iframe class="youtube-player video video--youtube" src="https://www.youtube.com/embed/${youtubeId}/" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div>`;
});
// Blah blah, whatever other Eleventy stuff you need.
@thobbs
thobbs / strip_border.py
Created August 28, 2018 05:46
Strip the border from an SVG for plotting through Inkscape
import sys
import lxml.etree as le
def main(filename):
with open(filename, 'r+b') as f:
doc = le.parse(f)
# strip border strokes
for elem in doc.xpath('//*[attribute::style]'):
if 'stroke:none' in elem.attrib['style']:
@killiantimsit
killiantimsit / wrangle-attr---delete-small-floating-pieces-sizebbox-assemblesop.c
Created November 16, 2017 20:53
Houdini - Attribute Wrangle VEX - Delete small floating pieces by bounding box sizes (Assemble SOP)
// Houdini - Assemble SOP > Attribute Wrangle SOP
// Delete small floating pieces by bounding box sizes
//
// To be used inside the VEXpression parameter of an Attribute Wrangle SOP
// with the "Run Over" mode set to "Detail (only once)".
// The geometry must be assembled first using an Assemble SOP
// with the "Create Packed Geometry" option disabled,
// "Create groups" option enabled,
// and the "Output Prefix" set or linked to assemble_output_prefix.
//string assemble_output_prefix = chs('../assemble1/outside_group');
@RobTrew
RobTrew / JXA_PersistentProperties.js
Last active December 3, 2024 10:37
Persistent 'properties' for OS X JavaScript for Applications (JXA)
(function () {
'use strict';
// OSX JavaScript for Applications lacks the persistent 'properties'
// of AppleScript (in which global variables and properties persist between script runs)
// but we can, of course, serialise to JSON or plist at the end of a script
// parsing it at the start of the next run.
// Here is one approach to persistence between script runs
// using JSON.stringify() and JSON.parse()
@jagregory
jagregory / gist:710671
Created November 22, 2010 21:01
How to move to a fork after cloning
So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear!
Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy.
* Off the top of my head *
1. Fork their repo on Github
2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it
git remote add my-fork [email protected]