This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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() ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
script.js
is on the html page, it sends the data to google docs- the javascript in
collection.js
takes the data and inserts it in the correct place in the spreadsheet
- input is at http://jsfiddle.net/nbass/DpEAb/
- collection spreadsheet is at https://docs.google.com/spreadsheet/ccc?key=0Ancky9VbVd4FdE1JcTZfcFZOQUgxallvRUV4QUJvUUE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.row { | |
margin-top: 0.5rem; | |
display: flex; | |
flex-direction: row; | |
flex-wrap: wrap; | |
} | |
.col { | |
flex: 1 1 8%; | |
margin: 0 0 0.5rem 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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, |