Skip to content

Instantly share code, notes, and snippets.

View kalabiyau's full-sized avatar
🐲
Breeding Dragons

Artem Chernikov kalabiyau

🐲
Breeding Dragons
  • Wildlife studios
  • Nürnberg, Germany
View GitHub Profile
require 'rubygems' rescue nil
require 'wirble'
require 'hirb'
require 'ap'
Dir[Rails.root.join"spec/support/factories/*"].each {|x| require x}
#load wirble
Wirble.init
Wirble.colorize
# load hirb
Started POST "/refinery/users/***" for 127.0.0.1 at 2011-02-09 10:46:54 +0300
SQL (0.7ms) SELECT name
FROM sqlite_master
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
SQL (0.2ms) SELECT name
FROM sqlite_master
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
SQL (0.2ms) SELECT name
FROM sqlite_master
default_scope :order=>('start_date DESC')
desc 'albums load to DB'
task :albumload => :environment do
require 'i18n'
yamlhash=YAML.load(File.open('albums.yml').read)
connect = Mysql2::Client.new(:host => 'localhost', :username=>'hc45_cms', :password=>'', :database=>'hc45_cms')
connect.query("delete from cms_module_gallery where fileid>61")
connect.query("delete from cms_module_gallery_props where fileid>61")
# connect.query("delete from cms_module_news_fieldvals where news_id>27")
# src = '/home/achernikov/Desktop/hc45.ru'
#!/bin/ash
MAC=`(date; cat /proc/interrupts) | md5sum | sed -r 's/^(.{10}).*$/\1/; s/([0-9a-f]{2})/\1:/g; s/:$//;'`
echo "00:${MAC}"
nvram set def_hwaddr="00:${MAC}"
nvram set wan_hwaddr="00:${MAC}"
nvram set lan_hwaddr="00:${MAC}"
nvram set wl0_hwaddr="00:${MAC}"
nvram set wl1_hwaddr="00:${MAC}"
stopservice wan
startservice wan
#!/usr/local/bin/ruby
require 'ap'
DOCS = %w{doc docx odt xls}
SCANS = %w{pdf tiff jpg jpeg bmp}
ARCHS = %w{zip rar 7z gz tgz bz2 bz}
MUZ = %w{mp3 wav flac}
dowsdir = '/home/achernikov/Downloads'
docs = []
archs = []
#!/usr/local/bin/ruby
module DocSorter
extend self
require 'ap'
DOC = %w{doc docx xls odt xlsx dwg txt cdr psd ppt eml csv log xslic}
CODE = %w{yml sql mht htm html php rb diff conf}
PDF = %w{pdf}
GRAPH = %w{tiff jpg jpeg bmp gif png}
ARH = %w{zip rar 7z gz tgz bz2 bz exe jnlp msi apk xpi gem ipsw}
SHELL = /bin/sh
#### Start of system configuration section. ####
srcdir = .
topdir = /usr/include/ruby-1.9.1
hdrdir = /usr/include/ruby-1.9.1
arch_hdrdir = /usr/include/ruby-1.9.1/$(arch)
VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby
prefix = $(DESTDIR)/usr
g++ -o obj/debug/extensions/externalize-string-extension.os -c -Wall -Werror -W -Wno-unused-parameter -Wnon-virtual-dtor -m64 -g -O0 -ansi -fno-rtti -fno-exceptions -fvisibility=hidden -Wall -Werror -W -Wno-unused-parameter -Wnon-virtual-dtor -m64 -g -O0 -ansi -fPIC -DV8_TARGET_ARCH_X64 -DENABLE_DISASSEMBLER -DDEBUG -DV8_FAST_TLS -DENABLE_DEBUGGER_SUPPORT -DENABLE_VMSTATE_TRACKING -DENABLE_LOGGING_AND_PROFILING -DV8_ENABLE_CHECKS -DOBJECT_PRINT -I/usr/local/include -Isrc src/extensions/externalize-string-extension.cc
src/extensions/externalize-string-extension.cc:55: error: 'uc16' was not declared in this scope
src/extensions/externalize-string-extension.cc:55: error: template argument 1 is invalid
src/extensions/externalize-string-extension.cc:56: error: invalid type in declaration before ';' token
src/extensions/externalize-string-extension.cc: In member function 'virtual v8::Handle<v8::FunctionTemplate> v8::internal::ExternalizeStringExtension::GetNativeFunction(v8::Handle<v8::String>)':
src/extensions/ext
class Msgfile
MSGCONVERTER = "perl -w ~/bin/msgconvert.pl"
@path = Rails.root.join("tmp/docs").to_s
def self.convert_to_mime
Dir.chdir(@path)
fsnames = Dir[@path+"/*.msg"].map! {|f| escape_rus_filename(f)}.map!{|f| Rails.root.join(f).to_s }