Skip to content

Instantly share code, notes, and snippets.

@kelegorm
kelegorm / main.dart
Last active December 26, 2023 21:55
Chord Trainer
import 'dart:math';
void main() {
Chord chord = genChord();
print(chordToRussian(chord));
}
Chord genChord() {
final keyIdx = Random().nextInt(12);
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
#!/usr/bin/env bash
check_update () {
local HGSTATUS=`hg status`
if [[ HGSTATUS = "M res/tags.csv" ]]; then
hg commit -m "tags.csv updated"
# hg push
return
fi
@kelegorm
kelegorm / numeric_input.dart
Last active August 29, 2015 14:19
Numeric Input polymer component
import 'package:polymer/polymer.dart';
@CustomTag('numeric-input')
class NumericInput extends PolymerElement {
num _value;
@published
num get value => _value;
@kelegorm
kelegorm / app.js
Last active August 29, 2015 14:02
Getting AppFog mongodb service settings
//... your project imports and mongoose
var mongoose = require('mongoose');
//... your application code
// start mongoose:
mongoose.connect(getMongodbURL(), function(error) {
// your initial code like bellow
if (error) {
console.log('Mongoose.connect error: ' + error);
<?xml version="1.0"?>
<!--
Created with IntelliJ IDEA.
User: kelegorm
Date: 25.03.13
Time: 11:17
-->
<s:TitleWindow xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
close="closeHandler(event)"
skinClass="skins.MyWindowSkin"