Skip to content

Instantly share code, notes, and snippets.

View fomkin's full-sized avatar
🎯
Focusing

Aleksey Fomkin fomkin

🎯
Focusing
View GitHub Profile
import java.io.InputStream
import java.util.zip.ZipInputStream
import scala.io.Source
import scala.io.Codec
import scala.xml.XML
object SimpleOsdParser {
type Table = Map[String, Seq[Seq[String]]]
package com.tenderowls.xml176;
import flash.utils.Namespace;
import haxe.io.Input;
import haxe.PosInfos;
enum XML176Document {
Node(name:QName, children:List<XML176Document>, pos:PosInfos);
Attr(name:QName, value:String, pos:PosInfos);
Comment(value:Input, pos:PosInfos);
package com.tenderowls.geom;
import com.tenderowls.errors.RangeError;
class BezierCurve {
var points:Array<Point<Float>>;
var step:Float;
package sys;
@:coreApi
class FileSystem {
public static function exists( path : String ) : Bool {
return new flash.filesystem.File(path).exists;
}
public static function rename( path : String, newpath : String ) : Void {
@fomkin
fomkin / index.js
Created February 5, 2016 10:02
requirebin sketch
// require() some stuff from npm (like you were using browserify)
// and then hit Run Code to run it on the right
var IncrementalDOM = require('incremental-dom'),
elementOpen = IncrementalDOM.elementOpen,
elementOpenStart = IncrementalDOM.elementOpenStart,
elementOpenEnd = IncrementalDOM.elementOpenEnd,
elementClose = IncrementalDOM.elementClose,
elementVoid = IncrementalDOM.elementVoid,
text = IncrementalDOM.text,
import scala.concurrent.Future
import scala.util.{Failure, Success}
object Czar {
class Context
case class ApiTestException(message: String, context: Context, cause: Option[Throwable] = None)
extends Exception(message)
}
trait Czar {
import scala.concurrent.Future
import scala.language.{implicitConversions, higherKinds, postfixOps}
import scala.concurrent.ExecutionContext.Implicits.global
trait Kleisli[M[+_], -A, +B] {
def apply(a: A): M[B]
def >=>[C](k: Kleisli[M, B, C]): Kleisli[M, A, C]
def <=<[C](k: Kleisli[M, C, A]): Kleisli[M, C, B]
}
<?
$ADDYBOT_TOKEN = 'Your token from AddyBot Cabinet';
// The data to send to the API
$postData = array(
'language' => 'english',
'userIdentifier' => 'telegram_user_id'
);
// Setup cURL
function Fsm(states) {
var self = this;
function onTransition(state, data) {
self.state = state;
self.data = data;
states[state](data, onTransition);
}
onTransition(Object.getOwnPropertyNames(states)[0], null);
}

Инструкция по использованию Git для генеральных директоров

Перед тем как делать коммит, надо удостовериться, что у вас на компьютере есть все актуальные измениния из центрального репозитория.

# git pull (получить из менения из) origin (псевдоним центрального реаозитория) master (название ветки)
git pull origin master

Если при выпонении этой команды возникли конфликты, то нужно сбросить свои изменения во временное хранилище stash. И выполнить pull еще раз.

git stash