Skip to content

Instantly share code, notes, and snippets.

View gram7gram's full-sized avatar

Dmitriy Gram gram7gram

View GitHub Profile
@gram7gram
gram7gram / docker.sh
Last active May 22, 2018 19:45
Install docker
#!/bin/bash
DC_VERSION=1.21.2
D_VERSION=latest
ARCH=amd64
echo "=> [+] Download docker-compose:$DC_VERSION"
sudo curl -L https://github.com/docker/compose/releases/download/$DC_VERSION/docker-compose-$(uname -s)-$(uname -m) \
-o /usr/local/bin/docker-compose \
@gram7gram
gram7gram / Comment.php
Last active July 12, 2017 15:17
Create comment hierarchy from array
<?php
class Comment
{
/**
* @var integer
*/
private $id;
@gram7gram
gram7gram / ArrowTouchListener.java
Created June 28, 2017 13:37
Android ImageView rotate around pivot point
package gram.ua.robinzon.listener.interaction.protractor;
import android.view.MotionEvent;
import android.view.View;
import android.view.animation.RotateAnimation;
import android.widget.ImageView;
import android.widget.TextView;
/**
* @author Gram <gram7gram@gmail.com>
@gram7gram
gram7gram / StatelessSelect.js
Last active January 18, 2017 16:20
Stateless React Select with redux
"use strict";
import '../../../node_modules/react-select/dist/react-select.css';
import React from 'react';
import Select from 'react-select';
import {objectValues} from '../../Survey/utils';
import keyBy from 'lodash/keyBy';
import trans from '../translator';
class StatelessSelect extends React.Component {