Skip to content

Instantly share code, notes, and snippets.

💭
I may be slow to respond.

Андрей Антипов andreyantipov

💭
I may be slow to respond.
Block or report user

Report or block andreyantipov

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@andreyantipov
andreyantipov / adb.sh
Created Jan 26, 2018 — forked from sofaking/adb.sh
Get battery level via adb
View adb.sh
adb shell dumpsys battery | grep level
View docker-compose-coreos.sh
sudo su -
mkdir -p /opt/bin
curl -L https://github.com/docker/compose/releases/download/1.5.1/docker-compose-`uname -s`-`uname -m` > /opt/bin/docker-compose
chmod +x /opt/bin/docker-compose
@andreyantipov
andreyantipov / IllustratorHandles.js
Last active Aug 29, 2015 — forked from paulkaplan/IllustratorHandles.js
Interactive Bezier curves with Illustrator style handles
View IllustratorHandles.js
var Curve = function(points, canvas){
this.points = points.map( function(p){ return new Point(p); })
this.points[0].setFirst();
this.points[this.points.length-1].setLast();
// create the underlying beziers
this.beziers = [];
for(var n=0; n<this.points.length-1; n++){
@andreyantipov
andreyantipov / gist:90349065ff355fc9b19d
Created Jun 24, 2015
os x. instant convert coffee from js from buffer
View gist:90349065ff355fc9b19d
pbpaste | js2coffee | pbcopy
@andreyantipov
andreyantipov / Gulp.js
Last active Aug 29, 2015
Gulp + Bower + Coffee (with resolve dependencies) + Jade + Saas with prefix
View Gulp.js
// Util
var gulp = require('gulp');
var plumber = require('gulp-plumber');
var rename = require('gulp-rename');
var connect = require('gulp-connect');
var minifyCss = require('gulp-minify-css');
var uglify = require('gulp-uglify');
var coffee = require('gulp-coffee');
var bower = require('gulp-bower');
@andreyantipov
andreyantipov / Gemfile
Last active Jan 5, 2017
supplement for rails (+angular) gemfile (development & test & automation & code smell)
View Gemfile
group :development, :test do
# testing
gem 'minitest-rails'
# use fixtures instead
# https://whatdoitest.com/getting-friendly-with-fixtures
#gem 'ffaker'
#gem 'factory_girl_rails'
#gem 'factory_girl-seeds'
View Factory class ruby
# https://github.com/sferik/twitter/blob/master/lib/twitter/factory.rb
module Twitter
class Factory
class << self
# Construct a new object
#
# @param method [Symbol]
# @param klass [Class]
# @param attrs [Hash]
# @raise [IndexError] Error raised when supplied argument is missing a key.
@andreyantipov
andreyantipov / initialize new type from factory
Created Oct 16, 2014
Initialize new type from factory class
View initialize new type from factory
# https://github.com/sferik/twitter/blob/48efb642beaa19355a4c1ba04a9fadac54cfba42/lib/twitter/media_factory.rb
# Initialize new type
require 'twitter/factory'
require 'twitter/media/photo'
module Twitter
class MediaFactory < Twitter::Factory
class << self
# Construct a new media object
#
View class_by_poc.rb
class Company
def initialize
@name = nil
@addr = nil
@url = nil
@tel = nil
@email = nil
@foundation = nil
end
You can’t perform that action at this time.