This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:set shiftwidth=2 | |
:set tabstop=2 | |
:set guifont=Hack:h12 | |
:set nofoldenable | |
colorscheme OceanicNext | |
map <F12> mzgg=G`z | |
map <D-/> gcc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Pick | |
public extension SignalProducer where Value: OptionalProtocol { | |
func pick<T>(picking: @escaping ((Value.Wrapped) -> (SignalProducer<T?, Error>))) -> SignalProducer<T?, Error> { | |
return self.flatMap(.latest) { value -> SignalProducer<T?, Error> in | |
if let value = value.optional { | |
return picking(value) | |
} else { | |
return SignalProducer<T?, Error>(value: nil) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static Int64 GetTimeStamp( | |
int year, int month, int day, | |
int hour, int minute, int second, int milliseconds) | |
{ | |
Int64 timestamp = DateToTicks(year, month, day) | |
+ TimeToTicks(hour, minute, second); | |
return timestamp + milliseconds * TicksInMillisecond; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
'use strict'; | |
var cmd = function () { | |
var request = require('request'), | |
async = require('async'), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import re | |
from echonest.remix.action import render | |
import echonest.remix.audio as audio | |
FIRST_SLOW_TIME = 180 | |
SLOW_TIME = 90 | |
FAST_TIME = 60 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Oddelenie | |
entity Oddelenie { | |
nazov : string required, length 5 30 | |
kod : string required, length 1 4 | |
uroven : real | |
} | |
# Zamestnanec | |
entity Zamestnanec { | |
meno : string required, length 2 30 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface NKStyle : NSObject | |
@property (assign) CGRect frame; | |
- (id)initWithFrame:(CGRect)frame; | |
// Background | |
@property (nonatomic, strong) NKColor *backgroundColor; | |
// Border | |
@property (assign) CGFloat borderRadius; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// From anywhere | |
NKDrawGradientWithHexColors(c, drawingRect, @"f0eef1", @"fbfbfc"); | |
NKDrawBorder(c, drawingRect, NKBorderBottom, 1, @"red"); | |
// From NSView | |
- (void)style { | |
[self drawGradientStartColor:@"f0eef1" endColor:@"fbfbfc"]; | |
[self drawBorder:NKBorderBottom lineWidth:1 color:@"red"]; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
# Alan | |
# Two-stack Turing machine simulator | |
# | |
# Author: Vojtech Rinik <[email protected]> | |
# License: MIT | |
# Example program: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
require "parslet" | |
require "pp" | |
require "ap" | |
require "colored" | |
program = "q0, (¢,Z,Z), (¢,B,B), q0, (R,-,-) | |
// Ak pride a, striedavo uklada a raz na 1. raz na 2. zasobnik. |