Skip to content

Instantly share code, notes, and snippets.

View noahbass's full-sized avatar

Noah Bass noahbass

View GitHub Profile
union() {
// body
translate([0,0,0])
cylinder(30, r1=4, r2=3.5, $fn=100);
// cone
translate([0,0,30])
cylinder(10, 3.5, 1, $fn=100);
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>MySQL Connection Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
#wrapper {
width: 600px;
margin: 20px auto 0;
input {
border: none;
box-shadow: none;
outline: 0;
background-color: #fff;
font-size: 3.125rem;
font-weight: 500;
color: #333;
height: auto;
padding: 0.5rem;
@noahbass
noahbass / wp-site-last-updated.php
Created August 23, 2014 21:16
Site last updated function for wordpress
<?php
/*
Description: Show the last time the website was updated.
Usage: use <?php site_last_updated(); ?> anywhere in your theme's files
*/
function site_last_updated($d = '') {
$recent = new WP_Query("showposts=1&orderby=modified&post_status=publish");
if ( $recent->have_posts() ) {
@noahbass
noahbass / wp-email-login.php
Created August 23, 2014 21:15
Use the users email address to login in wordpress.
<?php
/* Use the users email address to login */
add_filter('authenticate', 'bainternet_allow_email_login', 20, 3);
/**
* bainternet_allow_email_login filter to the authenticate filter hook, to fetch a username based on entered email
* @param obj $user
* @param string $username [description]
* @param string $password [description]
@noahbass
noahbass / 0_reuse_code.js
Created August 10, 2014 14:12
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@noahbass
noahbass / README.md
Last active April 4, 2019 05:01
google docs - insert data from an external form to a spreadsheet
.row {
margin-top: 0.5rem;
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
.col {
flex: 1 1 8%;
margin: 0 0 0.5rem 0;
@noahbass
noahbass / wordoftheday.php
Created July 13, 2013 00:43
For getting the word of the day from dictionary.com and displaying it nice and pretty.
<?php
// adapted from http://bavotasan.com/2010/display-rss-feed-with-php/
$rss = new DOMDocument();
$rss->load('http://dictionary.reference.com/wordoftheday/wotd.rss'); // calling dictionary.com
$feed = array();
foreach ($rss->getElementsByTagName('item') as $node) {
$item = array (
'title' => $node->getElementsByTagName('title')->item(0)->nodeValue,
'desc' => $node->getElementsByTagName('description')->item(0)->nodeValue,