Skip to content

Instantly share code, notes, and snippets.

View dimik's full-sized avatar

Dmitry Poklonskiy dimik

View GitHub Profile
@dimik
dimik / install_mac
Last active October 3, 2018 14:26
Paparazz UAV Installition Mac Osx
brew cask install xquartz
brew cask install gcc-arm-embedded
brew install gnutls gtk+ wget dfu-util gsl coreutils gnu-sed libglade libgnomecanvas sdl libusb libusb-compat
brew tap paparazzi/homebrew-paparazzi
brew install jsbsim
brew install opam
Better to use Etcher
Before better to erase the card
diskutil eraseDisk free UNTITLED /dev/diskN
@dimik
dimik / main.go
Last active September 5, 2018 01:37
Test Gobot
package main
import (
"fmt"
"os/exec"
"time"
"gobot.io/x/gobot"
"gobot.io/x/gobot/api"
"gobot.io/x/gobot/drivers/gpio"
@dimik
dimik / moscow.json
Created July 12, 2017 18:42
moscow.json
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
$palette-red-50: #FFEBEE;
$palette-red-100: #FFCDD2;
$palette-red-200: #EF9A9A;
$palette-red-300: #E57373;
$palette-red-400: #EF5350;
$palette-red-500: #F44336;
$palette-red-600: #E53935;
$palette-red-700: #D32F2F;
$palette-red-800: #C62828;
$palette-red-900: #B71C1C;
$('.goto').on('click', function(e) {
e.preventDefault();
var address = $(this).data('map');
ymaps.geocode(address, {
results: 1
}).then(function(res) {
// Выбираем первый результат геокодирования.
var result = res.geoObjects.get(0),
// Координаты геообъекта.
@dimik
dimik / gist:7715fdba2db6da9a3615da598fdae787
Last active May 6, 2017 14:53
cluster balloon layout
var MyClusterBalloonItemContentLayout = ymaps.templateLayoutFactory.createClass([
'<a href="/WebApp/tasks/editTask?id={{ properties.taskId }}" title="{{ properties.title }}" class="edit_btn">',
'<span class="glyphicon glyphicon-edit map_btn edit_map_btn"></span>',
'</a>'
].join(''), {
build: function() {
MyClusterBalloonItemContentLayout.superclass.build.call(this);
jQuery('.edit_btn', this.getParentElement()).on('click', function(e) {
...
})
@dimik
dimik / TraversonBase.js
Created March 7, 2016 08:23
Traverson context cache decorators and example
import {promisify} from '../core-decorators'
import ContextCache from './TraversonContextCache'
class TraversonBase {
@ContextCache.store
@ContextCache.retrieve
@promisify
getResource(links, context=TraversonBase.client, callback) {
let [{
params,
@dimik
dimik / test.js
Created August 7, 2015 15:10
Vow test
var vow = require('vow');
var Queue = require('vow-queue');
var queue = new Queue({ weightLimit : 10 });
var tasks = [];
var enqueue = function (task) {
tasks.push(queue.enqueue(task, { priority: 1, weight: 1 }));
};
var getProgress = function (num) {
return Math.round(num * 100 / tasks.length);
};