- Ruby on Rails exists because of PHP
- Elizabeth Naramore
- OINK-PUG
- PHP is a palindrome
- PHP Pioneered the "Share Nothing" Architecture
- PHP has more women in tech than other communities
- PHP made interweaving code in HTML mainstream
- PHP is Open Source
- HipHop is the coolest performance hack ever
- PHP make it easy for complete tech neophytes to start programming
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
# This is for voting for the budgetsketch project on http://cinciinnovates.com | |
# You can vote daily. This stupid simple mechanize script will simply submit | |
# your vote. You still have to confirm the vote from your email inbox. I | |
# figure a cron job to submit my vote keeps me from forgetting to vote daily | |
# and I (as a human) am still confirming; so not cheating. YMMV | |
require 'rubygems' | |
require 'mechanize' | |
require 'pp' |
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
rec_td_stat_name = StatName.find_by_title("Reception Touchdowns") | |
rush_td_stat_name = StatName.find_by_title("Rush Touchdowns") | |
rrtd_stat_name = StatName.find_by_title("Rushing and Receiving Touchdowns") | |
GameStat.find_all_by_stat_name_id(rrtd_stat_name.id).each do |game_stat| | |
rec_td_game_stat = GameState.find_by_game_id_and_player_id_and_stat_name_id(game_stat.game_id, game_stat.player_id, rec_td_stat_name.id) | |
rush_td_game_stat = GameState.find_by_game_id_and_player_id_and_stat_name_id(game_stat.game_id, game_stat.player_id, rush_td_stat_name.id) | |
game_stat.update_attributes(:value => rec_td_game_stat.value.to_i + rush_td_game_stat.value.to_i) | |
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
file '.gitignore', %q{ | |
log/*.log | |
tmp/**/* | |
doc/api | |
doc/app | |
} | |
run "touch log/.gitignore" | |
run "touch tmp/.gitignore" |
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
post '/events' do | |
data = request.body.read | |
File.open(File.join(EVENTS_PATH, "#{Time.now.strftime('%Y%m%dT%H%M%S')}.xml"), "w") do |f| | |
f.write data | |
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
# at the bottom of test_helper.rb | |
module ActiveSupport | |
class BacktraceCleaner | |
def remove_filters! | |
@filters = [] | |
end | |
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
# put this method definition in your .irbrc | |
def log_to(stream = STDOUT) | |
ActiveRecord::Base.logger = Logger.new(stream) | |
ActiveRecord::Base.clear_active_connections! | |
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
class User < ActiveRecord::Base | |
has_one :candidate_profile | |
alias_method :candidate_profile_without_initialization :candidate_profile | |
def candidate_profile | |
candidate_profile_withough_intitialization || build_candidate_profile | |
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
1. Setup javaCache.cmake below | |
2. ./bootstrap --prefix=/usr/local --system-libs --datadir=/share/cmake --docdir=/share/doc/cmake --mandir=/share/man --init=javaCache.cmake | |
3. make && make install |
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
#!/bin/sh | |
# Shell script to install your public key on a remote machine | |
# Takes the remote machine name as an argument. | |
# Obviously, the remote machine must accept password authentication, | |
# or one of the other keys in your ssh-agent, for this to work. | |
ID_FILE="${HOME}/.ssh/id_rsa.pub" | |
if [ "-i" = "$1" ]; then |
OlderNewer