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 works when jQuery is not included */ | |
function onYouTubePlayerReady(playerId) { | |
ytplayer = document.getElementById("myytplayer"); | |
ytplayer.addEventListener("onStateChange", "onytplayerStateChange"); | |
} | |
function onytplayerStateChange(newState) { | |
console.debug("Player's new state: " + newState); | |
} |
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
protected function processForm(sfWebRequest $request, sfForm $form) | |
{ | |
$form->bind($request->getParameter($form->getName()), $request->getFiles($form->getName())); | |
if ($form->isValid()) | |
{ | |
$file = $form->getValue('file'); | |
if($file) | |
{ | |
$ad->setMimeType($form->getValue('file')->getType()); | |
} |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <signal.h> | |
#include <unistd.h> | |
#include <netdb.h> | |
#include <netinet/in.h> | |
#include <arpa/inet.h> | |
#include <sys/socket.h> |
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
# MySQL. Versions 4.1 and 5.0 are recommended. | |
# | |
# Install the MySQL driver: | |
# gem install mysql | |
# On Mac OS X: | |
# sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql | |
# On Mac OS X Leopard: | |
# sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config | |
# This sets the ARCHFLAGS environment variable to your native architecture | |
# On Windows: |
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
#divFileProgressContainer | |
height: 75px | |
#divFileProgress | |
.progressWrapper | |
width: 100% | |
overflow: hidden | |
.progressContainer |
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
= render 'shared/header' | |
= yield | |
= render 'shared/footer' |
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 Rack | |
class AddAccessControlHeader | |
def initialize app, opts | |
@app = app | |
@extensions = opts | |
end | |
def call(env) | |
response = @app.call(env) | |
headers = Utils::HeaderHash.new(response[1]) |
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
# Flush all current rules from iptables | |
iptables -F | |
# Set default policies for INPUT, FORWARD and OUTPUT chains | |
iptables -P INPUT DROP | |
iptables -P FORWARD DROP | |
iptables -P OUTPUT ACCEPT | |
# | |
# Permit packets in to firewall itself that are part of existing and related connections. |
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
*filter | |
# Flush all current rules from iptables | |
-F | |
# log iptables denied calls | |
-A INPUT -m limit --limit 5/min -j LOG --log-prefix "iptables denied: " --log-level 7 | |
# Set default policies for INPUT, FORWARD and OUTPUT chains | |
-P INPUT DROP |
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
LoadModule passenger_module /opt/rubyee/lib/ruby/gems/1.8/gems/passenger-2.2.11/ext/apache2/mod_passenger.so | |
PassengerRoot /opt/rubyee/lib/ruby/gems/1.8/gems/passenger-2.2.5 | |
PassengerRuby /opt/rubyee/bin/ruby |
OlderNewer