Skip to content

Instantly share code, notes, and snippets.

View dmitriz's full-sized avatar

Dmitri Zaitsev dmitriz

View GitHub Profile
var gulp = require('gulp');
// Let's make things more readable by
// encapsulating each part's setup
// in its own method
function startExpress() {
var express = require('express');
var app = express();
app.use(express.static(__dirname));
@dmitriz
dmitriz / README.md
Created April 17, 2015 00:25
angular-bootstrap testing output
@dmitriz
dmitriz / backbone-itemstodo-minimized.html
Last active October 11, 2015 11:47
Here is my attempt to hack the popular Jerome Gravel-Niquet's Backbone Todo App down to a MVA (Minimum Workable App).
<!--
Web Application with Backbone: BEGINNER TUTORIAL
Backbone.js is a very popular and light(weight) JavaScript library
for building Web Applications.
However, learning it I found frustratingly few simple examples of
true workable applications with all lines of code explained.
Here is my attempt to hack the popular Jerome Gravel-Niquet's Backbone Todo App
@dmitriz
dmitriz / gist:7736870
Last active December 29, 2015 22:29
StackMob PHP Library
<?php
class StackmobStore implements OutStore {
// Create new hashes with preserved Ids
public function createManyWithId ($schema, array $array) {
$adjustedArray = $this->_adjustIdMany($schema, $array);
return $this->createMany($schema, $adjustedArray);
}
/** Creating new hashes on StackMob DB
@dmitriz
dmitriz / parse.php
Created December 13, 2013 09:51
Parse PHP Client
<?php
class ParseStore implements OutStore {
/** Creating new hashes on Parse DB
* @param string $schema - Parse schema (class)
* @param array $array - Array of Hashes
* @return array $ids - Parse IDs of entries created
*/
public function createMany ($schema, array $bundle) {
$bundle = $this->_moveIds($bundle);
@dmitriz
dmitriz / README.md
Created January 6, 2016 15:51 — forked from jxson/README.md
README.md template

Synopsis

At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)

Code Example

Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.

Motivation

@dmitriz
dmitriz / .jshintrc.js
Created January 25, 2016 21:35 — forked from connor/.jshintrc.js
jshintrc example
// NOTE: I added the .js extension to this gist so it would have syntax highlighting. This file should have NO file extension
{
// Settings
"passfail" : false, // Stop on first error.
"maxerr" : 100, // Maximum error before stopping.
// Predefined globals whom JSHint will ignore.
"browser" : true, // Standard browser globals e.g. `window`, `document`.
@dmitriz
dmitriz / backbone-app-tutorial.html
Last active August 29, 2016 14:48
Backbone App: Beginner Tutorial
<!--
Web Application with Backbone: BEGINNER TUTORIAL
Backbone.js is a very popular and light(weight) JavaScript library
for building Web Applications.
However, learning it I found frustratingly few simple examples of
true workable applications with all lines of code explained.
Here is my attempt to hack the popular Jerome Gravel-Niquet's Backbone Todo App
@dmitriz
dmitriz / myRSI.js
Created January 10, 2018 04:55 — forked from howie50417/myRSI.js
myRSI.js
var _ = require('lodash');
var log = require('../core/log.js');
var RSI = require('./indicators/RSI.js');
// let's create our own method
var method = {};
// prepare everything our method needs
method.init = function() {
function C (I_1, I_2, I_3) {
J_1 = f_1(I_1, I_2, I_3)
J_2 = f_2(I_1, I_2, I_3)
return [J_1, J_2]
}