Skip to content

Instantly share code, notes, and snippets.

@ivanbuhov
ivanbuhov / ReduceFilePath
Created May 4, 2014 18:43
Reduce File Path
using System;
using System.Collections.Generic;
using System.Linq;
namespace ReduceFilePath
{
class ReduceFilePath
{
public const string CurrentFolderToken = ".";
public const string ParentFolderToken = "..";
@ivanbuhov
ivanbuhov / GoldbachConjecture
Created May 4, 2014 18:45
Goldbach Conjecture
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GoldbachConjecture
{
class GoldbachConjecture
@ivanbuhov
ivanbuhov / MagicSquare
Created May 4, 2014 18:46
Magic Square
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MagicSquare
{
class MagicSquare
{
@ivanbuhov
ivanbuhov / app.css
Last active January 4, 2017 15:05
Proof of concept NativeScript app whcih is using HomeKit API
.title {
font-size: 30;
horizontal-align: center;
margin:20;
}
button {
font-size: 42;
horizontal-align: center;
}
var CustomMessageCompositeViewControllerDelegate = NSObject.extend({
// pass resolve and reject functions to the delegate instance and save them as instance properties
initWithResolveReject: function(resolve, reject) {
var self = this.super.init();
if(self) {
this.resolve = resolve;
this.reject = reject;
}
return self;
#!/usr/bin/env python
import os
import subprocess
import shlex
import sys
def env(env_name):
return os.environ[env_name]