This file contains 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
// ==================================== | |
// Limit signup by banning domains | |
function bp_as_restrict_signup_domains( $result ) { | |
$banned = array( | |
'spam1.com', | |
'spam2.com' | |
); | |
$error = 'Your email domain has been the source of spam. Please use another email address.'; |
This file contains 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
mod = Sketchup.active_model # Open model | |
ent = mod.entities # All entities in model | |
sel = mod.selection # Current selection | |
# Zero all totals | |
t_volume = 0.0 | |
t_faces = 0.0 | |
# Calculate the conversion factors | |
cu_yd = 12**3 * 27 |
This file contains 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
# This script loads Flickr's RSS feed and exatrcts images from it into the SU model | |
mod = Sketchup.active_model # Open model | |
ent = mod.entities # All entities in model | |
sel = mod.selection # Current selection | |
tag = 'architecture' # Flickr search tag | |
rad = 1000 # circle radius | |
n = 20 # number of images |
This file contains 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
mod = Sketchup.active_model # Open model | |
ent = mod.entities # All entities in model | |
sel = mod.selection # Current selection | |
sel.each { |i| | |
vec = Geom::Vector3d.new 0,0,-(i.bounds.min.z) | |
t = Geom::Transformation.new vec | |
ent.transform_entities(t, i) | |
} |
This file contains 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
// Get all annotations in current document | |
var annots = this.getAnnots(); | |
// Assemble them into a Tab-delimited string (remove linebreaks in comments, too) | |
var cMyC = "Comment\tPage"; | |
for ( var i=0; i<annots.length; i++ ) | |
cMyC += ("\n"+annots[i].contents.replace(/(\r\n|\n|\r)/gm,"")+ "\t" + annots[i].page); | |
// Export them to MS Excel (opens the data there) | |
this.createDataObject({cName: "myCommentList.xls", cValue: cMyC}); |
This file contains 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
<div id="bumpersticker" style="margin:0;padding:0;position:fixed;top:0;right:0;background:none;z-index:1000;opacity:0.75;" | |
onMouseOver="this.style.opacity='1.0'" onMouseOut="this.style.opacity='0.75'" > | |
<a href="https://www.hillaryclinton.com/" title="I support Hillary Clinton. You should, too!" style="margin:0;padding:0;background:none;" target="_blank"> | |
<img src="https://dl.dropboxusercontent.com/u/1129994/hillary-clinton.png" width="200" height="200" alt="Hillary Clinton Bumpersticker" style="margin:0;padding:0;border:0;background:none;" /> | |
</a> | |
</div> |
This file contains 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
<div id="bumpersticker" style="margin:0;padding:0;position:fixed;top:0;right:0;background:none;z-index:1000;opacity:0.75;" | |
onMouseOver="this.style.opacity='1.0'" onMouseOut="this.style.opacity='0.75'" > | |
<a href="https://www.youtube.com/watch?v=-rSDUsMwakI" title="Say no to hate!" style="margin:0;padding:0;background:none;" target="_blank"> | |
<img src="https://dl.dropboxusercontent.com/u/1129994/safety-kilt-pin.png" width="200" height="200" alt="Safety (Kilt) Pin Bumpersticker" style="margin:0;padding:0;border:0;background:none;" /> | |
</a> | |
</div> |
This file contains 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
javascript: (function() { | |
if (!window.lqpage) { | |
lqpage = {}; | |
lqpage.s = document.createElement('script'); | |
lqpage.s.src = 'http://media.alexschreyer.net/lqpage/lqpage.js'; | |
document.getElementsByTagName('head')[0].appendChild(lqpage.s) | |
} | |
})(); |
This file contains 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
// "Liquid Page" -- Make all DIVs on a page draggable | |
// By A. Schreyer, (c) 2009-2016 | |
// Downloaded from: www.alexschreyer.net | |
// Based on the Jquery UI themeroller | |
window.lqpage || (lqpage = {}); | |
lqpage.trString = ""; | |
lqpage.s1 = document.createElement("script"); | |
lqpage.s2 = document.createElement("script"); | |
lqpage.s1.setAttribute("src", "https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"); |
This file contains 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
# Apply transformations to a brick wall (headers only) | |
mod = Sketchup.active_model # Open model | |
ent = mod.entities # All entities in model | |
sel = mod.selection # Current selection | |
# Max pullout of headers in inches | |
max_ext = 2 | |
ent.each { |e| |
OlderNewer