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
class Welss::Texas | |
BUILD = [:build_api, :build_county_name, :build_well_name] | |
def build | |
BUILD.each {|m| send(m) } | |
end | |
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
Host * | |
SendEnv LANG LC_* | |
HashKnownHosts yes | |
GSSAPIAuthentication yes | |
GSSAPIDelegateCredentials no | |
Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc | |
HostKeyAlgorithms ssh-rsa,ssh-dss | |
MACs hmac-md5,hmac-sha1,hmac-ripemd160 |
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
parseDateDB = function(d) { | |
arr = d.split('-') | |
y = arr[0] | |
m = arr[1] * 1 - 1 | |
d = arr[2] | |
try { | |
return new Date(y, m, d) | |
} catch (e) | |
return new Date() | |
} |
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
module Models::HstoreMap | |
def convert_hstore_to(to_type, *methods) | |
methods.each do |meth| | |
alias_method :"old_#{meth}", meth | |
define_method meth do | |
send(:"old_#{meth}").try(to_type) | |
end | |
end | |
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
# SSL self signed localhost for rails start to finish, no red warnings. | |
# 1) Create your private key (any password will do, we remove it below) | |
$ openssl genrsa -des3 -out server.orig.key 2048 | |
# 2) Remove the password | |
$ openssl rsa -in server.orig.key -out server.key |
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
' This module contains method for copying and referencing data | |
' Updates the selected items from H:12 to H:25 | |
Sub UpdateSelected() | |
Application.Calculation = xlManual | |
' First Check update productioin escenarios | |
'If Range("Upd_Scenarios") = "Yes" Then | |
'Call UpdateProductionScenaries | |
'End If | |
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
Controllers | |
============== | |
class HomeController < ApplicationController | |
def votes | |
@lista_pueblo = Table.sum(:lista_pueblo) | |
@lista_sur = Table.sum(:lista_sur) | |
@lista_frente_grande = Table.sum(:lista_frente_grande) | |
@lista_union_pro = Table.sum(:lista_union_pro) |
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
'Runs a country iteration and does many calculations | |
Sub CountryIterations() | |
Dim iteration, period As Integer | |
iteration = Range("countryIterations") | |
If Not (IsNumeric(iteration)) Or iteration < 10 Then | |
MsgBox ("You must set the iterations above 10, check address " + Range("countryIterations").AddressLocal) | |
Exit Sub | |
End If |
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
'Runs a country iteration and does many calculations | |
Sub CountryIterations() | |
Dim iteration, period As Integer | |
iteration = Range("countryIterations") | |
If Not (IsNumeric(iteration)) Or iteration < 10 Then | |
MsgBox ("You must set the iterations above 10, check address " + Range("countryIterations").AddressLocal) | |
Exit Sub | |
End If |