Skip to content

Instantly share code, notes, and snippets.

@mnjstwins
mnjstwins / Utils.CustomQuery.xml
Created March 31, 2016 18:04 — forked from eduard93/Utils.CustomQuery.xml
Custom class Query examples for InterSystems Caché
<?xml version="1.0" encoding="UTF-8"?>
<Export generator="Cache" version="25">
<Class name="Utils.CustomQuery">
<Super>%Persistent,%Populate</Super>
<TimeCreated>63869,45310.24869</TimeCreated>
<Property name="Prop1">
<Type>%String</Type>
</Property>
<?xml version="1.0" encoding="UTF-8"?>
<Export generator="Cache" version="25" zv="Cache for Windows (x86-64) 2015.1.1 (Build 505U)" ts="2015-06-17 22:55:48">
<Class name="App.Log">
<Super>%Persistent</Super>
<TimeChanged>63720,82487.41709</TimeChanged>
<TimeCreated>63685,63064.148177</TimeCreated>
<Parameter name="Null">
<Description>
Replacement for missing values</Description>
Class Debug.Trace Extends %RegisteredObject
{
ClassMethod On(aGN As %String = "") As %Status [ ProcedureBlock = 0 ]
{
#define InvalidIO $io'=$p
if aGN="" set %TraceLog=$name(^CacheTemp.TraceLog)
else set %TraceLog=aGN
kill @%TraceLog
for i=1:1:$stack-1 {
<?xml version="1.0" encoding="UTF-8"?>
<Export generator="Cache" version="25" zv="Cache for Windows (x86-64) 2015.3 (Build 211U)" ts="2015-11-06 21:30:14">
<Class name="Utils.DynamicObject">
<Super>%RegisteredObject</Super>
<TimeChanged>63862,77333.461179</TimeChanged>
<TimeCreated>63862,75470.717321</TimeCreated>
<Property name="obj">
<Description>
Свойство, хранящее настоящий динамический объект</Description>
@mnjstwins
mnjstwins / pyrss2gen-example.py
Created November 21, 2015 15:31 — forked from martg0/pyrss2gen-example.py
PyRSS2Gen example
"""
example of the usage of pyrss2gen library.
URL: http://www.dalkescientific.com/Python/PyRSS2Gen.html
"""
import datetime
import PyRSS2Gen
rss = PyRSS2Gen.RSS2(
title = "Andrew's PyRSS2Gen feed",
@mnjstwins
mnjstwins / gist:13ee1da02885853e358e
Created November 6, 2015 20:34 — forked from pullmonkey/gist:778755
XML example of the dataset from VIN API
<?xml version="1.0" encoding="UTF-8"?>
<hash>
<telescopic-steering-column>Std.</telescopic-steering-column>
<front-split-bench-seat>N/A</front-split-bench-seat>
<powertrain-warranty-distance>36,000 mile</powertrain-warranty-distance>
<leather-seat>Std.</leather-seat>
<load-bearing-exterior-rack>N/A</load-bearing-exterior-rack>
<front-spring-type>Coil</front-spring-type>
<steel-wheels>N/A</steel-wheels>
<maximum-gvwr>No data lbs</maximum-gvwr>
@mnjstwins
mnjstwins / Calculated InitialExpression
Created October 21, 2015 11:56 — forked from mccrackend/Calculated InitialExpression
Using a calculated value for a property's InitialExpression. Written in Intersystems Cache Object Script.
...class definition
/// Set InitialExpression to any class method returning the calculated value.
/// In this case, I'm returning a string value.
Property BaseDirectoryPath As %String [ InitialExpression = {..GetBaseDirectoryForNamespace()} ];
/// Returns the base directory path to use for whatever cache instance the class is being used in.
ClassMethod GetBaseDirectoryForNamespace() As %String
{
SET vPath = $CASE($Namespace,
@mnjstwins
mnjstwins / ascii_movie_image_ver_1.py
Created October 4, 2015 15:23 — forked from MotionDesignStudio/ascii_movie_image_ver_1.py
Python ASCII Video And ASCII Image Creator
#!/usr/bin/env python
import sys
import cv2
import subprocess
from subprocess import call
import aalib
import Image
var AngularJSApp = angular.module("AngularJSApp", ["ngResource", "ngSanitize"])
.config(function ($routeProvider, $httpProvider) {
$routeProvider.
when('/', { controller: NavigationCtrl, templateUrl: 'navigation.html' }).
when('/feedback', { controller: FeedbackCtrl, templateUrl: 'feedback.html' }).
otherwise({ redirectTo: '/' });
$httpProvider.defaults.withCredentials = true;
delete $httpProvider.defaults.headers.common["X-Requested-With"];
@mnjstwins
mnjstwins / 0_reuse_code.js
Last active August 29, 2015 14:15
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console