start new:
tmux
start new with session name:
tmux new -s myname
| ### Keybase proof | |
| I hereby claim: | |
| * I am stefanosc on github. | |
| * I am stefanosc (https://keybase.io/stefanosc) on keybase. | |
| * I have a public key ASB-DApLRrUNvOaDs4Qs-th7ZUxsfPYfAQePDlEtM58pFwo | |
| To claim this, I am signing this object: |
| class Email < ActiveRecord::Base | |
| # Nope, it's not RFC compliant. F*** that regex. | |
| # http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html | |
| EmailRegex = /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i.freeze | |
| before_validation :strip_spaces | |
| # Public: The email address. | |
| # column :address |
| #!/bin/bash | |
| # sidekiq Init script for Sidekiq | |
| # chkconfig: 345 100 75 | |
| # | |
| # Description: Starts and Stops Sidekiq background worker. | |
| # | |
| # User-specified exit parameters used in this script: | |
| # | |
| # Exit Code 5 - Incorrect User ID | |
| # Exit Code 6 - Directory not found |
| #!/bin/sh | |
| # | |
| # redis - this script starts and stops the redis-server daemon | |
| # | |
| # chkconfig: - 85 15 | |
| # description: Redis is a persistent key-value database | |
| # processname: redis-server | |
| # config: /etc/redis/redis.conf | |
| # config: /etc/sysconfig/redis | |
| # pidfile: /var/run/redis.pid |
| //Cool little js function to get version of IE if browser is IE | |
| var ie = (function(){ | |
| var undef, | |
| v = 3, | |
| div = document.createElement('div'), | |
| all = div.getElementsByTagName('i'); | |
| while ( |
| SELECT e.album_id | |
| FROM jos_hwdms_media as m | |
| LEFT JOIN jos_hwdms_album_map e | |
| ON m.id = e.media_id | |
| LEFT JOIN jos_hwdms_category_map as h | |
| ON m.id = h.element_id |
| class ProfileMethod | |
| attr_reader :test_methods, :results | |
| def initialize | |
| @test_array = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], | |
| [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], | |
| [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], | |
| [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], | |
| [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], | |
| [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], |
| class ProfileMethod | |
| attr_reader :test_methods, :results | |
| def initialize | |
| @test_array = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], | |
| [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], | |
| [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], | |
| [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], | |
| [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], | |
| [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], |
| class RPNCalculator | |
| def evaluate(rpn_expr) | |
| begin | |
| count = 0 | |
| result = rpn_expr.split(' ').each_with_object([]) do |item,arr| | |
| item.match(/(\A-?\d+\z)|(\A[\+\-\*]\z)/) do | |
| if $1 | |
| count += 1 | |
| arr << item.to_i | |
| else |