Skip to content

Instantly share code, notes, and snippets.

View arrowcircle's full-sized avatar

Oleg Bovykin arrowcircle

  • Ivy Knob
  • Berlin, Germany
View GitHub Profile
@arrowcircle
arrowcircle / vibration_damper.jscad
Last active February 16, 2017 14:40
Openjscad vibration damper
// title : Motor softmount for quadcopter
// author : Oleg Bovykin
// license : MIT License
// revision : 0.0.1
// tags : Flex, 3d print, quadcopters, vibration, blackblox
// file : motor_vibration_dump.jscad
function getParameterDefinitions() {
return [
{
@arrowcircle
arrowcircle / box.rb
Last active June 30, 2016 17:11
Namespace problem
# app/services/pochta/box.rb
module Pochta
class Box
include ActiveModel::Model
include ActiveModel::Validations
attr_accessor :human, :version, :type
def initialize opts = {}
@version = 1
require 'open-uri'
require 'json'
require 'net/smtp'
class BlacklistChecker
API_KEY = ENV['BLACKLIST_API_KEY'] || '5b81c659e0bc66638db97663b972eb49'
attr_accessor :domain
def initialize(domain)
@domain = domain
#!/bin/bash
if [ ! -f ~/runonce ]
then
sudo locale-gen ru_RU.UTF-8
sudo rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo yum update
sudo yum install ansible -y
touch ~/runonce
fi
@arrowcircle
arrowcircle / console output
Last active August 29, 2015 14:13
elixir cowboy handler problem
iex(1)> TimelineHandler.handle("foo", "bar")
** (UndefinedFunctionError) undefined function: :cowboy_http_req.reply/4 (module :cowboy_http_req is not available)
:cowboy_http_req.reply(200, [{"content-type", "application/javascript"}], "Pusher.JSONP.receive(1, null, {});", "foo")
(puxir) lib/timeline_handler.ex:9: TimelineHandler.handle/2
@arrowcircle
arrowcircle / headhunter.md
Last active August 29, 2015 14:07
WANTED! RailsRumble 2014

About us

I and my collegue looking for two teammates for RailsRumble 2014 contest.

IDEA

We are planning to rewrite from scratch our lib redditor - it adds super content editor to any rails model. Content can be build from any number of any blocks: texts (1, 2 and 3 columns), images, sliders, videos, cut-separators and pairs of text + image (video, text or anything else). We are adding default css and js to work out of the box. Its really easy and fun to use redditor for content management - and we want to make it event better!

We are looking for

@arrowcircle
arrowcircle / _form_example.html.haml
Created May 23, 2014 08:55
How to make custom form_for?
= super_form_for @book do |f|
= f.input :title
= f.input :body
@arrowcircle
arrowcircle / controller.rb
Last active August 29, 2015 14:01
How to refactor view?
class ProductsContrller < AcpplicationController
def index
@products = Product.order('category_id ASC')
end
end
@arrowcircle
arrowcircle / gist:7620313
Created November 23, 2013 21:41
erlypusher nginx config for docker
upstream erlypusher {
server localhost:8080;
}
server {
listen 80 default_server;
location / {
proxy_pass http://erlypusher;
proxy_http_version 1.1;