This file contains 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 which rbenv > /dev/null; then eval "$(rbenv init -)"; fi |
This file contains 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
function r() { | |
if [[ "g|generate|c|console|s|server|db|dbconsole|new" =~ $1 ]]; then | |
if [ -x script/rails ]; then | |
script/rails $@ | |
else | |
bundle exec rails $@ | |
fi | |
else | |
if [ -x script/rake ]; then | |
script/rake $@ |
This file contains 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 Person | |
def self.get_name | |
persons_name | |
end | |
private | |
def self.persons_name | |
end | |
end |
This file contains 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
NoMethodError (undefined method `total_preferences_per_as_converted_share=' for #<EquityCertificate:0x007fde6a0ab108>): | |
app/models/equity_certificate.rb:319:in `set_total_preferences_per_as_converted_share' | |
app/models/equity_certificate.rb:81:in `adjust_fields' | |
app/models/equity_certificate.rb:50:in `set_fields' | |
app/models/transaction/certificate_transaction.rb:122:in `find_or_create_certificate' | |
app/controllers/transactions_controller.rb:43:in `update' | |
config/initializers/quiet_assets.rb:7:in `call_with_quiet_assets' |
This file contains 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
$.ajax | |
url: "/sheets/1" #+ @extraUrlParams | |
type: "PUT" | |
contentType: "application/json" | |
data: JSON.stringify([change]) | |
dataType: "json" | |
success: (data, textStatus, jqXHR) => | |
$('#sheet-errors').hide('slow') #if there are errors | |
#handleUpdateResponse(data) | |
this.receivedAjax(data) |
This file contains 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
#Fix certificates that have a duplicate name | |
#Captable.where(id: 990).find_each do |cap| | |
Captable.find_each do |cap| | |
results = {} | |
cap.equity_certificates.find_each do |s| | |
puts "Cert ID: #{s.id}" | |
name = s.name.strip | |
if results.has_key?(name) | |
results[name] << s | |
else |
This file contains 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
form = $('#option_expense_report') | |
when drop element | |
certificateId = element.data('certificate-id') | |
html += '<input type="hidden" id= value="' + certificateId + '" name="option_expense_report[certificates][]">' | |
form.append($(html)) | |
$('a.certificate_link').click -> | |
certId = $(this).date('certificate-id') |
This file contains 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
#!/usr/bin/ruby | |
require 'mysql' | |
begin | |
con = Mysql.new 'localhost', 'user12', '34klq*' | |
puts con.get_server_info | |
rs = con.query 'SELECT VERSION()' | |
puts rs.fetch_row |
This file contains 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
$('modal').html(<%= escapajdaf;lsj | |
$('modal').find('#new_thing') | |
setup_input_numberic_formatting(document.findByElementId('new_thing')) |
This file contains 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
var olarkId = "<account-id>"; | |
var id = window.setTimeout(function(){}, 0); | |
while (id--) { | |
window.clearTimeout(id); | |
} | |
for (var key in Object.keys(window)) { | |
if (key.indexOf('hbl') == 0 || key.indexOf('habla') == 0) { | |
clearTimeout(window[key]); | |
delete window[key]; |
OlderNewer