This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
desc 'update existing engagements with direction' | |
task :update_direction_in_engagement, %i[tenant] => | |
[:environment] do |_t, args| | |
logger = Logger.new(Rails.root.join('log', 'rake.log')) | |
logger.info 'UpdateDirectionInEngagement -- START' | |
Apartment::Tenant.switch(args[:tenant]) do | |
ActiveRecord::Base.connection.uncached do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH=~/.oh-my-zsh | |
# Set name of the theme to load. Optionally, if you set this to "random" | |
# it'll load a random theme each time that oh-my-zsh is loaded. | |
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes | |
ZSH_THEME="rbates" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH=~/.oh-my-zsh | |
# Set name of the theme to load. Optionally, if you set this to "random" | |
# it'll load a random theme each time that oh-my-zsh is loaded. | |
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes | |
ZSH_THEME="rbates" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.oh-my-zsh/custom/mauricio.plugin.zsh | |
########## My alias ########## | |
# up 'n' folders | |
alias ..='cd ..' | |
alias ...='cd ../..' | |
alias ....='cd ../../..' | |
alias .....='cd ../../../..' | |
# cp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[21] pry(#<Mandrill::CreateLocalMessageFromIncoming>)> headers | |
=> { | |
"Received"=> | |
["from NAM03-BY2-obe.outbound.protection.outlook.com (unknown [104.47.42.65]) by relay-5.us-west-2.relay-prod (Postfix) with ESMTPS id 5E94E26BBC for <[email protected]>; Thu, 28 Jun 2018 20:05:48 +0000 (UTC)", | |
"from CY4PR08MB3432.namprd08.prod.outlook.com (10.171.253.149) by CY4PR08MB3464.namprd08.prod.outlook.com (10.171.253.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.906.20; Thu, 28 Jun 2018 20:05:46 +0000", | |
"from CY4PR08MB3432.namprd08.prod.outlook.com ([fe80::118e:ef5b:8352:e544]) by CY4PR08MB3432.namprd08.prod.outlook.com ([fe80::118e:ef5b:8352:e544%2]) with mapi id 15.20.0906.023; Thu, 28 Jun 2018 20:05:46 +0000"], | |
"Dkim-Signature"=> | |
"v=1; a=rsa-sha256; c=relaxed/relaxed; d=hyasrl.onmicrosoft.com; s=selector1-harriague-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=M2yU3c8ht |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream site_server { | |
server unix:/tmp/site.sock fail_timeout=0; | |
} | |
server { | |
listen 80; | |
server_name lottosend.sk, www.lottosend.sk; | |
return 301 $scheme://www.lottosend.com$request_uri; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Application.Hashtable | |
jQuery -> | |
class HashTable | |
constructor: (@obj) -> | |
@length = 0 | |
@items = {} | |
for p of @obj | |
if @obj.hasOwnProperty(p) | |
@items[p] = @obj[p] | |
@length++ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Refinery::AdminController.class_eval do | |
before_filter :restrict_refinery_to_refinery_users | |
private | |
def restrict_refinery_to_refinery_users | |
return if current_user && current_user.has_role?(:refinery) | |
redirect_to root_path #this user is not a refinery user because they have no refinery roles. | |
return false | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
gem 'rails', '3.2.3' | |
gem 'pg' | |
gem 'thin' | |
gem 'activeadmin' | |
# Add users roles management | |
gem 'cancan' | |
# Add IP reverse geocoding support |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
# Database administrative login by UNIX sockets | |
local all postgres ident | |
# TYPE DATABASE USER CIDR-ADDRESS METHOD | |
# "local" is for Unix domain socket connections only | |
local all all ident | |
# IPv4 local connections: |
NewerOlder