Skip to content

Instantly share code, notes, and snippets.

View vsevolod's full-sized avatar
🏇
boosting

Avramov Vsevolod vsevolod

🏇
boosting
  • Russia, Saint-Petersburg
View GitHub Profile
@Hendrixer
Hendrixer / Gulpfile.js
Last active June 7, 2022 14:42
Gulpfile with Livereload, Nodemon, and other features
var gulp = require('gulp'),
concat = require('gulp-concat'),
plumber = require('gulp-plumber'),
server = require('tiny-lr')(),
refresh = require('gulp-livereload'),
mocha = require('gulp-mocha'),
stylus = require('gulp-stylus'),
notify = require('gulp-notify'),
nodemon = require('gulp-nodemon'),
jshint = require('gulp-jshint'),
@chuckg
chuckg / mechanize_download_adapter.rb
Last active February 22, 2016 08:23
A Paperclip adapter to allow attachments to be set using a Mechanize::Download object; the default Paperclip::FileAdapter is incompatible with unlinked Tempfiles which Mechanize returns.
require 'paperclip'
module Paperclip
# Mechanize unlinks its Tempfiles immediately after creating them and some
# Paperclip functionality relies on an actual file available in the
# filesystem; not just a reference.
class MechanizeDownloadAdapter < AbstractAdapter
def initialize(target)
@target = target
cache_current_values