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
Bansai! | |
* What is Bansai? | |
This is a script extension for Inkscape.It was inspired by the splendid BonsaiJS library. As well as | |
my lazy disposition, which does not like "coding" graphics ;) | |
So in short Bansai lets you select one or elements in Inkscape, and export them to BonsaiJS JSON notation. | |
* What is supported by this version? | |
A little, and still a lot :) At the moment I have had time to implement support for |
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
<!DOCTYPE html> | |
<html ng-app="app" id="ng-app"> | |
<head> | |
<meta charset="utf-8" /> | |
<meta http-equiv="x-ua-compatible" content="ie=edge" /> | |
<title>my app</title> | |
<HTA:APPLICATION | |
APPLICATIONNAME="my app" | |
SCROLL="yes" | |
SINGLEINSTANCE="yes" /> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" | |
content="text/html; charset=utf-8" /> | |
<script src="jquery-1.7.2.min.js" ></script> | |
<script src="handlebars-1.0.0.beta.6.js" ></script> | |
<script src="underscore-min.js" ></script> | |
<script src="backbone-min.js" ></script> |
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
/// write to file | |
var txtFile = "c:/test.txt"; | |
var file = new File(txtFile); | |
var str = "My string of text"; | |
file.open("w"); // open file with write access | |
file.writeln("First line of text"); | |
file.writeln("Second line of text " + str); | |
file.write(str); | |
file.close(); |
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
# Blender 2.78 (sub 0), Commit date: 2016-09-28 08:41, Hash 0b13b7a | |
bpy.context.space_data.tree_type = 'SverchCustomTreeType' # Property | |
bpy.ops.node.new_node_tree() # Operator | |
bpy.ops.node.add_search(use_transform=True, node_item='9') # Operator | |
bpy.ops.node.translate_attach_remove_on_cancel(TRANSFORM_OT_translate={"value":(0, 0, 0), "constraint_axis":(False, False, False), "constraint_orientation":'GLOBAL', "mirror":False, "proportional":'DISABLED', "proportional_edit_falloff":'SMOOTH', "proportional_size":1, "snap":False, "snap_target":'CLOSEST', "snap_point":(0, 0, 0), "snap_align":False, "snap_normal":(0, 0, 0), "gpencil_strokes":False, "texture_space":False, "remove_on_cancel":True, "release_confirm":True}, NODE_OT_attach={}, NODE_OT_insert_offset={}) # Operator | |
bpy.data.node_groups["NodeTree"].nodes["Random Vector"].count_inner = 28 # Property | |
bpy.ops.node.add_search(use_transform=True, node_item='130') # Operator | |
bpy.ops.node.translate_attach_remove_on_cancel(TRANSFORM_OT_translate={"value":(25. |
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
#!/bin/bash | |
# | |
# bash script to create playlist files in music subdirectories | |
# | |
# Steve Carlson (steve@scarlson.co) | |
find . -type d | | |
while read subdir | |
do | |
rm -f *.m3u |
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
# From "A simple unix/linux daemon in Python" by Sander Marechal | |
# See http://stackoverflow.com/a/473702/1422096 | |
# | |
# Modified to add quit() that allows to run some code before closing the daemon | |
# See http://stackoverflow.com/a/40423758/1422096 | |
# | |
# Joseph Ernest, 2016/11/12 | |
import sys, os, time, atexit | |
from signal import signal, SIGTERM |
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
var DBFILENAME = './myDb.json'; | |
var fs = require('fs'); // filesystem access needed | |
var myDb = {}; // the DB will be in RAM | |
try { myDb = JSON.parse(fs.readFileSync(DBFILENAME)); } catch(e) { } // read DB from disk | |
function serialize() { fs.writeFile(DBFILENAME + '.temp', JSON.stringify(myDb), function(err) { if (!err) { fs.rename(DBFILENAME + '.temp', DBFILENAME); } } ); } | |
function serializeSync() { fs.writeFileSync(DBFILENAME + '.temp', JSON.stringify(myDb)); fs.rename(DBFILENAME + '.temp', DBFILENAME); } | |
setInterval(serialize, 60 * 1000); // serialize to disk every minute | |
process.on('exit', serializeSync); process.on('SIGINT', serializeSync); process.on('SIGTERM', serializeSync); // serialize to disk when process terminates | |
/* |
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
var DBFILENAME = './myDb.json'; | |
var fs = require('fs'); // filesystem access needed | |
var myDb = {}; // the DB will be in RAM | |
try { myDb = JSON.parse(fs.readFileSync(DBFILENAME)); } catch(e) { } // read DB from disk | |
function serialize() { fs.writeFile(DBFILENAME + '.temp', JSON.stringify(myDb), function(err) { if (!err) { fs.rename(DBFILENAME + '.temp', DBFILENAME); } } ); } | |
function serializeSync() { fs.writeFileSync(DBFILENAME + '.temp', JSON.stringify(myDb)); fs.rename(DBFILENAME + '.temp', DBFILENAME); } | |
setInterval(serialize, 60 * 1000); // serialize to disk every minute | |
process.on('exit', serializeSync); process.on('SIGINT', serializeSync); process.on('SIGTERM', serializeSync); // serialize to disk when process terminates | |
/* |
OlderNewer