Skip to content

Instantly share code, notes, and snippets.

🥑
Eating avocado

Dmitry Polushkin dmitry

🥑
Eating avocado
Block or report user

Report or block dmitry

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
@dmitry
dmitry / _search.html.haml
Created Dec 8, 2012
Custom filters/search in sidebar for active_admin using a partial
View _search.html.haml
= form_for @search, url: collection_path,
as: :q,
builder: ActiveAdmin::Filters::CustomFormBuilder,
html: {method: :get, class: :filter_form} do |f|
= f.input :code_contains, as: :string
= f.input :code_contains, as: :filter_string
= f.form_buffers.last
@dmitry
dmitry / gist:da7d835307d77ecc6d9c597c6fbf09e4
Created Jul 29, 2019
Kinnisvara недвижимость эстония продажа
View gist:da7d835307d77ecc6d9c597c6fbf09e4
https://www.facebook.com/groups/375161055994516
kuldnebors.ee
okidoki
kv.ee
city24.ee
soov
Kinnisvara24
osta.ee
View gist:c0fef7c87041a76589fad9e61bdd521e
WWOOF - http://www.wwoof.org/
Help Exchange http://www.helpx.net/
Global Ecovillage Network ecovillage.org/
View Алег Русак и Алеся Алисиевич - Я Дарю Тебе Мечту
Dm__________Gm
Нежность....Нега...
_________C
Я в тебя плыву,лечу....
F___________________B
Я лучом,дождем и снегом
В твою душу постучу.
Gm
Прошепчу тебе признанье
View gist:b8d741a3862ba950a85aeb04d2d13319
https://fasttext.cc/docs/en/supervised-tutorial.html
https://www.samtalksml.net/aligning-vector-representations/
https://medium.com/@makcedward/from-my-experience-i-just-try-a-magic-number-d4dcc6179ea3
https://habr.com/ru/post/436878/
View cleanup_vcr_cassettes.rb
require 'set'
USED_CASSETTES = Set.new
module CassetteReporter
def insert_cassette(name, options = {})
USED_CASSETTES << VCR::Cassette.new(name, options).file
super
end
end
VCR.extend(CassetteReporter)
View weather-rain-estonia.rb
require 'open-uri'
urls = %w(3 6 9 12 15 18 21 24 27 30 33 36 39 42 45 48 54 60 66 72 84 96 108 120 132 144 156 168 180).map do |i|
"https://www.passageweather.com/maps/baltic/rain/%03d.png" % i
end
`wget #{urls.join(' ')}`
`convert -loop 0 -delay 50 *.png rain.gif`
`rm *.png`
@dmitry
dmitry / backbone-mixin.js
Created Oct 1, 2011 — forked from wesen/backbone-mixin.js
Merge backbone views (mixin pattern)
View backbone-mixin.js
/**
* ## Merging mixin views in backbone.js ##
*
* really just more a test for tumblr gistr
*/
/**
* Merge the mixin (a Backbone.View) into another Backbone.View. Automatically merge events, defaults, and call the parent initializer.
**/
function mergeMixin(view, mixin) {
View gist:2117358fc5018d407aee2b0a78486c34
https://answers.microsoft.com/en-us/skype/forum/skype_linux-skype_callms-skype_audioms/skype-for-linux-beta-sound-problem/6ea7f878-5c6c-42b3-bc86-cef605f13397
https://wiki.archlinux.org/index.php/PulseAudio
http://www.pc-freak.net/blog/how-to-fix-pulseaudio-and-skype-crappy-sound-glitches-choppy-sound-and-crackling-on-debian-gnu-linux/
https://askubuntu.com/questions/279407/how-to-disable-microphone-from-auto-adjusting-its-input-volume
@dmitry
dmitry / paper_trail.rb
Created May 21, 2014
Include paper_trail for all the models.
View paper_trail.rb
ActiveRecord::Base.module_eval do
class << self
def inherited_with_paper_trail(subclass)
skip_models = %w(schema_migrations versions)
inherited_without_paper_trail(subclass)
table_name = subclass.table_name
if !skip_models.include?(table_name) && table_name.present?
You can’t perform that action at this time.