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
| import bpy | |
| scene = bpy.context.scene | |
| for ob in scene.objects: | |
| if ob.type == 'MESH': | |
| scene.objects.active = ob | |
| bpy.ops.object.mode_set(mode='EDIT', toggle=False) | |
| # Run an edit-mode operator on every object in the scene [1] | |
| # [1]: http://blender.stackexchange.com/a/2639/8112 |
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
| { | |
| "export_version": "0.054", | |
| "framed_nodes": {}, | |
| "groups": {}, | |
| "nodes": { | |
| "Integer": { | |
| "bl_idname": "IntegerNode", | |
| "color": [ | |
| 0.6079999804496765, | |
| 0.6079999804496765, |
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
| ul.tags { | |
| display: inline; | |
| margin: 0; | |
| padding: 0; | |
| } | |
| ul.tags li { | |
| display: inline; | |
| list-style: none; | |
| margin: 0; | |
| padding: 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 | |
| // Sets up includes functions | |
| include_once( ABSPATH . 'wp-content/themes/twentyfourteen-child/inc/enqueues.php' ); | |
| include_once( ABSPATH . 'wp-content/themes/twentyfourteen-child/inc/post-types.php' ); | |
| include_once( ABSPATH . 'wp-content/themes/twentyfourteen-child/inc/media-gallery.php' ); | |
| include_once( ABSPATH . 'wp-content/themes/twentyfourteen-child/inc/featured-template-tags.php' ); | |
| // Disable dashboard widgets | |
| add_action('admin_menu', 'disable_default_dashboard_widgets'); | |
| function disable_default_dashboard_widgets() { |
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
| (function( $ ){ | |
| $(document).ready(function(){ | |
| var $demo = $('#demo'); | |
| var svgData = { | |
| "demo": { | |
| "strokepath": [ | |
| { | |
| "path": "m 23.083,12.562 0,-2.822 0.935,0.11 0,-2.115 L 12.729,6.007 0,8.43 l 0,2.473 1.18,-0.164 0,6.872 3.423,0 0,6.414 16.25,1.969 2.875,-0.348 0,-8.232 5.107,0.016 0,7.596 2.373,-0.287 0,-10.038 0.792,0.039 0,-1.504 -8.917,-0.674 z", | |
| "duration": 3200, | |
| 'strokeWidth': 0.2, |
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
| var pathObj = { | |
| "drawing": { | |
| "strokepath": [ | |
| { | |
| "path": "m 177.29113,3.795453 c -64.75119,0 -117.242311,52.490947 -117.242311,117.242517 0,50.25905 31.63369,93.11682 76.072141,109.78745 l 27.01777,-72.04807 c -15.27566,-5.72982 -26.14953,-20.4629 -26.14953,-37.73938 0,-22.25826 18.04413,-40.302475 40.30193,-40.302475 22.2578,0 40.30271,18.044215 40.30271,40.302475 0,17.27648 -10.87466,32.00956 -26.15033,37.73938 l 27.01777,72.04807 c 44.43768,-16.67063 76.07215,-59.5284 76.07215,-109.78745 0,-64.75157 -52.49034,-117.242517 -117.2423,-117.242517 z", | |
| "duration": 1000 | |
| } | |
| ], | |
| "dimensions": { | |
| "width": 355, |
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
| var pathObj = { | |
| "drawing2": { | |
| "strokepath": [ | |
| { | |
| "path": "m 204.27539,193.85742 c 30.7333,-11.34413 51.15322,-40.62465 51.17773,-73.38476 1.7e-4,-43.236842 -35.05026,-78.287271 -78.2871,-78.287113 -43.23685,-1.66e-4 -78.287279,35.050266 -78.287114,78.287113 0.04333,32.73752 20.452384,61.99115 51.162114,73.33398", | |
| "duration": 600 | |
| } | |
| ], | |
| "dimensions": { | |
| "width": 355, |
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
| // Based on Drawing example | |
| // http://p5js.org/examples/demos/Hello_P5_Drawing.php | |
| // All the paths | |
| var paths = []; | |
| // Are we painting? | |
| var painting = false; | |
| // How long until the next circle | |
| var next = 0; | |
| // Where are we now and where were we? | |
| var current; |
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
| // Encode array | |
| var json_string = JSON.stringify(features_array); | |
| console.log(json_string); // ["POLYGON((13.80796143 42.56851169000001,13.80769846 42.568553580000014,13.80777101 42.568770150000006,13.80804818 42.568736520000016,13.80796143 42.56851169000001))","POLYGON((13.8078327 42.56894971,13.80810299 42.568905150000006,13.80804818 42.568736520000016,13.80777101 42.568770150000006,13.8078327 42.56894971))"] |
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
| import os | |
| import re | |
| def abbrev(): | |
| '''Shrink variables''' | |
| for dirpath, dirnames, filenames in os.walk('imap\\contrib\\imap'): | |
| for i in filenames: | |
| name, extension = os.path.splitext('imap\\contrib\\imap\\'+ i) | |
| if extension == '.py': | |
| # Create abbreviation files directory |