This document provides guidelines for maintaining high-quality Python code. These rules MUST be followed by all AI coding agents and contributors.
All code you write MUST be fully optimized.
"Fully optimized" includes:
| <Project Sdk="Microsoft.NET.Sdk"> | |
| <PropertyGroup> | |
| <OutputType>Exe</OutputType> | |
| <TargetFramework>net472</TargetFramework> | |
| </PropertyGroup> | |
| <PropertyGroup> | |
| <GeneratedText><![CDATA[ | |
| using System%3B |
| string GetTargetSqlServerVersion(){ | |
| var dte = (DTE)GetService(typeof(DTE)); | |
| var project = dte.ActiveDocument.ProjectItem.ContainingProject; | |
| return project.GetType().GetProperty("Globals").GetValue(project).GetType().GetProperty("Parent").GetValue(project.GetType().GetProperty("Globals").GetValue(project)).GetType().GetProperty("DatabaseSchemaProvider").GetValue(project.GetType().GetProperty("Globals").GetValue(project).GetType().GetProperty("Parent").GetValue(project.GetType().GetProperty("Globals").GetValue(project))).GetType().GetProperty("Platform").GetValue(project.GetType().GetProperty("Globals").GetValue(project).GetType().GetProperty("Parent").GetValue(project.GetType().GetProperty("Globals").GetValue(project)).GetType().GetProperty("DatabaseSchemaProvider").GetValue(project.GetType().GetProperty("Globals").GetValue(project).GetType().GetProperty("Parent").GetValue(project.GetType().GetProperty("Globals").GetValue(project)))) | |
| } |
A list of slides from nodeconf
Node.js core does its best to treat every platform equally. Even if most Node developers use OS X day to day, some use Windows, and most everyone deploys to Linux or Solaris. So it's important to keep your code portable between platforms, whether you're writing a library or an application.
Predictably, most cross-platform issues come from Windows. Things just work differently there! But if you're careful, and follow some simple best practices, your code can run just as well on Windows systems.
On Windows, paths are constructed with backslashes instead of forward slashes. So if you do your directory manipulation
| Steps: | |
| 0. Checkout your git repo from the server (I use /var/www/carbonite) | |
| 1. Upload both of these files to the same directory on your server | |
| 2. chmod +x restart_node.sh | |
| 3. nohup node github_post_commit.js 2>&1 >> github_post_commit.log & | |
| 4. In the github admin for your repo, set a post commit hook to the url http://<your host>:8080/ | |
| 5. Make a commit to your repo | |
| 6. Point a browser at http://<your host>:8080/ and you should see the commit |
| coffee = require 'coffee-script' | |
| https = require 'https' | |
| npm = require 'npm' | |
| Irc = require 'irc-js' | |
| cradle = require 'cradle' | |
| {GitHubApi} = require 'github' | |
| request = require 'request' | |
| gitHubApi = new GitHubApi() | |
| githubIssueApi = gitHubApi.getIssueApi() | |
| githubObjectApi = gitHubApi.getObjectApi() |
| var follow = require("follow") | |
| var seen = {} | |
| follow({ db: "http://isaacs.ic.ht/registry" | |
| , since: 20267 | |
| , include_docs: true }, function (er, update) { | |
| if (er) throw er | |
| var doc = update.doc |