Skip to content

Instantly share code, notes, and snippets.

View geuis's full-sized avatar

Charles Lawrence geuis

View GitHub Profile
@geuis
geuis / gist:04d0fc80857ecafd9a983772119d619b
Last active August 18, 2023 21:29
Blender 3d Print Settings, Errors and Answers
#Blender 3d Print Settings, Errors and Answers
Non Manifold Edges:
- Mesh -> Cleanup -> Merge by Distance (0.01mm works well)
- If holes in the mesh, highlight the holes. Probably need to manually fix them.
Bad Contiguous Edges:
- Recalculate normals inside
##Blender Settings for Prusa mk3s:
XYZ in Blender match XYZ for PrusaSlicer and mk3s printer
Use canvas drawImage to clip and scale. MDN docs are confusing as hell, this is simple: http://falcon80.com/HTMLCanvas/ImageManipulation/ClipImage.html
Comcast has just announced that in November, they will be implementing a 1 terabyte monthly data cap on all customers in the San Francisco area. Customers that go over that amount will automatically be billed an additional $200 "no matter how much data is used" plus another $10 per additional 50 gigabytes used. This is price gouging and abusive to customers who have no other options.
I live in San Francisco somewhat close to downtown. In my personal case, on *average* I use 200-250gb per month. However, since I am a software engineer professionally and a heavy user of my home internet connection, there are some months where I have extremely high usage and can quite easily almost hit that 1tb mark or go over. This can happen if I am having to download a lot of software for projects like Linux installs, related media files, etc. So do simply to do my job, my previously unlimited connection that rarely may go over 1tb will now cost me hundreds of dollars extra a month unexpectedly.
To go further, I do not curr
@geuis
geuis / gist:8b1b2ea57d7f9a9ae22f80d4fbf5b97f
Last active January 10, 2024 16:43
Get Youtube video urls
// Run from the dev tools console of any Youtube video
// Accurate as of July 2, 2020.
//
// Copy and paste this into the dev console in a browser with the desired video loaded.
//
// NOTE: Some Youtube videos do not directly expose the video url in the response.
// This script doesn't currently attempt to handle those. It will work for most other general video types though.
(async () => {
const html = await fetch(window.location.href).then((resp) => resp.text()).then((text) => text);
# 3 columns, center column wraps to content width, outer columns grow dynamically
http://codepen.io/anon/pen/ZWMMaX
@geuis
geuis / gist:c671651028d65e329dcd
Created February 27, 2016 00:10
ESLint Rules
{
"env": {
"browser": 1,
"node": 1
},
"globals": {
"jQuery": 1,
"$": 1,
"_gaq": 1,
"_ga": 1,
@geuis
geuis / gist:460056be4527ef98db74
Last active October 27, 2015 18:47
Useful git aliases
# update all submodules
git config --global alias.subupdate 'submodule update --init --recursive'
# checkout a branch in each submodule and update it
git config --global alias.subpull = submodule foreach git pull origin production
# show aliases
git config --global alias.alias '!git config -l | grep alias | cut -c 7-'
@geuis
geuis / gist:bfe457b0eecefaff5d8d
Created June 30, 2015 20:55
Hide & Show icons on desktop
# Hide
defaults write com.apple.finder CreateDesktop false && killall Finder
# Show
defaults write com.apple.finder CreateDesktop true && killall Finder
@geuis
geuis / gist:1489bbd1a8e47e86db38
Last active April 9, 2017 08:38
Force jshint validation with pre-commit hook (bash)
#!/bin/sh
# Run changed javascript files through jshint before commiting and prevent bad
# code from being committed.
# If you need to prevent newly added js from being checked because its in a
# library like bower_components, add a .jshintignore file and list the directory
# INSTALL: Add as a file in your repo as .git/hooks/pre-commit
FILES=$(git diff --cached --name-only --diff-filter=ACM| grep ".js$")
if [ "$FILES" = "" ]; then
exit 0
CSS:
@-webkit-keyframes blink {
90% { opacity: 1; }
100% { opacity: 0; }
}
@-moz-keyframes blink {
90% { opacity: 1; }
100% { opacity: 0; }
}
@-o-keyframes blink {