Skip to content

Instantly share code, notes, and snippets.

@rukeba
rukeba / example_component.js
Created March 16, 2015 09:38
Example Component
jQuery(function ($) {
window.ExampleComponent = {
$placeholder: $('.js-component-placeholder'),
$item: $('.js-component-item'),
$btn_submit: $('.js-btn-component-submit'),
init: function () {
this.load_something();
[
{
"product": "Wordpress",
"parameters": {
"site-name": "wp4",
"app-pool-name": "DefaultAppPool",
"db-engine": "mysql",
"db-host": "localhost",
"db-port": "3306",
"db-username": "ывс",
@rukeba
rukeba / web.config
Last active August 29, 2015 13:57
Railo 4 Tomcat project powered by Helicon Zoo config
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<heliconZoo>
<clear />
<application name="railo.4.project">
<environmentVariables>
<add name="ERROR_LOG_DIR" value="%APPL_PHYSICAL_PATH%/logs" />
</environmentVariables>
</application>
@rukeba
rukeba / web.config
Created February 10, 2014 11:09
Running Flask app on IIS with Helicon Zoo
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<heliconZoo>
<clear />
<application name="python.project" >
<environmentVariables>
<add name="VIRTUAL_ENV" value="%APPL_PHYSICAL_PATH%\venv" />
<add name="PATH" value="%APPL_PHYSICAL_PATH%\venv\Scripts;%PATH%" />
<add name="PYTHONPATH" value="%APPL_PHYSICAL_PATH%\venv\lib\site-packages;%APPL_PHYSICAL_PATH%\venv\lib;%APPL_PHYSICAL_PATH%;%APPL_PHYSICAL_PATH%\project" />
@rukeba
rukeba / ServiceConfiguration.Cloud.cscfg
Last active December 23, 2015 17:38
Running Helicon Zoo powered web site on Windows Azure Cloud Service
<?xml version="1.0" encoding="utf-8"?>
<ServiceConfiguration serviceName="WindowsAzure2" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="2" osVersion="*" schemaVersion="2013-03.2.0">
<Role name="WebRole1">
<Instances count="1" />
<ConfigurationSettings>
</ConfigurationSettings>
</Role>
</ServiceConfiguration>
@rukeba
rukeba / example.html
Last active December 16, 2015 20:49
Default project files for django-cms
{% load cms_tags sekizai_tags %}
<!doctype html>
<head>
<title>{{ request.current_page.get_title }}</title>
{% render_block "css" %}
</head>
<body>
{% cms_toolbar %}
{% placeholder "main" %}
@rukeba
rukeba / deploy.py
Created April 26, 2013 09:30
Templates for Django project with virtualenv & deploy powered by Helicon Zoo.
import sys
import os
import os.path
VIRTUALENV_EXE = os.path.join(os.path.dirname(sys.executable), 'scripts\\virtualenv.exe')
VIRTUALENV_NAME = 'venv'
DJANGO_PROJECT_NAME = 'project'
PROJECT_DIR = os.path.dirname(__file__)
@rukeba
rukeba / add_to_system_path.js
Created May 11, 2012 09:08
cscript: add path in system %PATH%, no reboot required
var shell = WScript.CreateObject('WScript.Shell');
var envs = shell.Environment('SYSTEM');
var systemPath = envs('PATH');
var paths = systemPath.split(';');
if (WScript.Arguments.Count() != 1){
WScript.StdErr.WriteLine('Error: one argument expected');
WScript.StdErr.WriteLine('Paths in %PATH% :');
for (i in paths){
WScript.StdOut.WriteLine(paths[i]);
@rukeba
rukeba / index.html
Created November 8, 2011 16:26
Very simple example chat on Node.js
<html>
<head>
<title>Node.js Zoo Chat</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
$('form#send').submit(onSend);
longPoll();
$('#nickname').focus();
});
@rukeba
rukeba / switch_python_version.py
Created January 27, 2011 07:53
Switch python version between multiple python installations
""" http://nedbatchelder.com/blog/200810/switching_python_versions_on_windows.html
Change the .py file extension to point to a different
Python installation.
"""
import _winreg as reg
import sys
pydir = sys.argv[1]
todo = [