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 Ext.ux.data.PlainWriter | |
* @extends Ext.data.DataWriter | |
* DataWriter extension for writing a single {@link Ext.data.Record} object in plain format in preparation for executing a remote RESTful CRUD action. | |
* @author Javier Toledo <javier at theagilemonkeys.com> | |
* @version 1.0 | |
* @date March 6th, 2010 | |
* @license http://www.gnu.org/licenses/lgpl-3.0.txt | |
*/ | |
Ext.ns("Ext.ux.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
/* An Ext Panel which distribute items in equally-sized columns that fills all available width */ | |
Ext.ns("Ext.ux"); | |
Ext.ux.AutoColumnPanel = Ext.extend(Ext.Panel, { | |
layout: 'column', | |
initComponent: function() { | |
var columnWidth = 1/this.items.length; | |
Ext.each(this.items,function(item){ | |
Ext.apply(item,{ | |
columnWidth: columnWidth |
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
/** | |
Mierder-mode for jQuery | |
------------------------- | |
Cuando quieres evitar que un formulario sea enviado | |
automáticamente por el navegador, podrías pensar que | |
es suficiente con asignar un "return false;" al evento | |
onsubmit de tu formulario, y esto era así hasta que | |
los ingenieros de Microsoft pensaron que sería divertido |
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 | |
GLASSFISHPATH=/usr/share/glassfishv2/bin | |
GLASSFISHDOMAINHOME=/var/lib/glassfishv2/domains/domain1 | |
case "$1" in | |
start) | |
echo "starting glassfish from $GLASSFISHPATH" | |
sudo -u glassfish $GLASSFISHPATH/asadmin start-domain --user admin --passwordfile ${GLASSFISHDOMAINHOME}/config/passwordfile domain1 | |
;; |
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
/*Initializations*/ | |
int a,b,temp; | |
a=1; | |
b=2; | |
/*The classic swap code*/ | |
temp=a; | |
a=b; | |
b=temp; | |
/*Values have been happily swapped! (a==2 && b==1)*/ |
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
/*Initializations*/ | |
int a,b; | |
a=1; | |
b=2; | |
/*The swap code*/ | |
a^=b^=a^=b; | |
/*That's all! Your variables swapped magically*/ |
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
require ::File.expand_path('../config/environment', __FILE__) | |
# Use the iframe Rack middleware | |
require 'rack/iframe' | |
use Rack::Iframe | |
run MyApp::Application |
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
.photos | |
- @photos.each do |photo| | |
.photo=image_tag photo.url(:medium) |
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
# Originally found at http://steveno.wordpress.com/2009/03/26/uninstall-mysql-on-mac-os-x/ | |
# Saved here for the record | |
sudo rm /usr/local/mysql | |
sudo rm -rf /usr/local/mysql* | |
sudo rm -rf /Library/StartupItems/MySQLCOM | |
sudo rm -rf /Library/PreferencePanes/My* | |
sudo vi /etc/hostconfig # and remove the line MYSQLCOM=-YES- | |
sudo rm -rf /Library/Receipts/mysql* | |
sudo rm -rf /Library/Receipts/MySQL* | |
sudo rm -rf /var/db/receipts/com.mysql.* |
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 you're having this exception in Rails >=3.2.X, on Ruby >1.9.X.. | |
# | |
# uninitialized constant ActiveSupport::SecureRandom | |
# | |
# ..and you don't want to debug half dozen of gems until you | |
# find which one is causing the error, you can use this hack | |
# as Ruby's SecureRandom API is 100% compatible with the | |
# Rails <3.2 ActiveSupport::SecureRandom API. | |
# | |
# This is absolute uglyness, but works and I wont tell nobody |
OlderNewer