Skip to content

Instantly share code, notes, and snippets.

View develop7's full-sized avatar

Andrei Dziahel develop7

View GitHub Profile
#!/usr/bin/perl -w
use strict;
if ($#ARGV < 0) {
print "Usage: aml_fw_unpack.pl file.img\n";
exit(1);
}
my $filecontent;
# Automatically generates the plain-text version of emails from the html
# template using premailer.
class SmartMailer < ActionMailer::Base
protected
def collect_responses(headers)
responses = super(headers)
@develop7
develop7 / 0_reuse_code.js
Created November 13, 2013 16:44
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

Когда мы хотим скопировать данные из production окружения Ruby on Rails приложения в development или staging, обычно, нам нужно скопировать дамп базы данных и статические файлы (например, изображения загруженные пользователями). Копирование базы может не представляет проблем (например, ее можно копировать из бэкапов или резервных серверов БД). А вот копирование статических файлов занимает много времени и ресурсов сервера с которого копируют (и на который копируются) файлы.

В рассылке ror2ru Макс Лапшин предложил

@develop7
develop7 / bashrc.sh
Created March 25, 2011 22:37 — forked from 228vit/.bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
# [ -z "$PS1" ] && return
if [[ -n "$PS1" ]]; then ##ну вот же оно! это нужно было раскомментить
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
BlackListPhone:
phone_1:
code: 123
phone: 111
Contents: [content_1]
phone_2:
code: 123
phone: 222
phone_3:
code: 123