Skip to content

Instantly share code, notes, and snippets.

View bDrwx's full-sized avatar

Andrew Bodosov bDrwx

View GitHub Profile
@bDrwx
bDrwx / 0_reuse_code.js
Last active September 16, 2015 10:47
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
@bDrwx
bDrwx / gulpfile.js
Created October 6, 2015 19:53 — forked from ktmud/gulpfile.js
An example gulpfile.js with bower components and live reload support
var BatchStream = require('batch-stream2')
var gulp = require('gulp')
var coffee = require('gulp-coffee')
var uglify = require('gulp-uglify')
var cssmin = require('gulp-minify-css')
var bower = require('gulp-bower-files')
var stylus = require('gulp-stylus')
var livereload = require('gulp-livereload')
var include = require('gulp-include')
var concat = require('gulp-concat')
@bDrwx
bDrwx / watermark.rb
Created February 17, 2013 07:53 — forked from monde/watermark.rb
module Paperclip
class Watermark < Processor
##
# A Paperclip::Processor for watermarking images with imagemagick's
# composite command.
#
# Place this code in lib/paperclip_processors/watermark.rb or into a Rails initializer.
#
# Example: All orginal files are resized to be at most 480 pixels in
@bDrwx
bDrwx / watermark.rb
Created February 23, 2013 19:10 — forked from monde/watermark.rb
module Paperclip
class Watermark < Processor
##
# A Paperclip::Processor for watermarking images with imagemagick's
# composite command.
#
# Place this code in lib/paperclip_processors/watermark.rb or into a Rails initializer.
#
# Example: All orginal files are resized to be at most 480 pixels in
@bDrwx
bDrwx / watermark.rb
Created February 23, 2013 19:15
Не работает в моем окружении.
module Paperclip
class Watermark < Processor
# Handles watermarking of images that are uploaded.
attr_accessor :current_geometry, :target_geometry, :format, :whiny, :convert_options, :watermark_path, :overlay, :position
def initialize file, options = {}, attachment = nil
super
geometry = options[:geometry]
@file = file
@crop = geometry[-1,1] == '#'
@bDrwx
bDrwx / image
Created February 27, 2013 19:36
Imagemagic example watermark
composite -gravity center /Users/bdrwx/floating-window-9018/public/images/close.gif /Users/bdrwx/floating-window-9018/public/images/image-1.jpg /Users/bdrwx/floating-window-9018/public/images/testo.png
1. cisco> enable
2. cisco# clock set 17:10:00 28 Aug 2009
3. cisco# configure terminal
4. cisco(config)# ip domain name test.dom
5. cisco(config)# crypto key generate rsa
6. cisco(config)# service password-encryption
7. cisco(config)# username user privilege 15 password 7 Pa$$w0rd
8. cisco(config)# aaa new-model
9. cisco(config)# line vty 0 4
10. cisco(config-line)# transport input ssh

Keybase proof

I hereby claim:

  • I am bDrwx on github.
  • I am bdrwx (https://keybase.io/bdrwx) on keybase.
  • I have a public key whose fingerprint is 3FEC 6030 D7EB 978F C2A7 8D9C 5416 0277 4E73 C701

To claim this, I am signing this object:

@bDrwx
bDrwx / Cisco QoS
Created November 21, 2016 19:45
Cisco QOS Modular
1. Добавляем политику трафика к интерфейсу.
Switch(config)#interface fastethernet 0/1
Switch(config-if)#service-policy output policy1
2. Идентифицируем функцию QoS данной политики, используя классы.
Switch(config)#policy-map policy1
Switch(config-pmap)#class cisco
Switch(config-pmap-c)#bandwidth 3000
Switch(config-pmap)#class class-default
Switch(config-pmap-c)#bandwidth 2000
3. Классификация потока трафика, как принадлежащего к указанному классу QoS.
@bDrwx
bDrwx / introrx.md
Created December 18, 2016 08:06 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing