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 get_pwd() { | |
print -D $PWD | |
} | |
function battery_charge() { | |
if [ -e ~/bin/batcharge.py ] | |
then | |
echo `python ~/bin/batcharge.py` | |
else | |
echo '' |
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 'sinatra' | |
require 'aws/s3' | |
module S3Config | |
bucket = 'assets.baymachine.com' | |
s3_key = '1B7JJ1RZXMZP7VQADY02' | |
s3_secret = '8UvZq1RtsyE72t0vq2U1FaaZStGXm9fj87uFub2b' | |
end | |
post "/convert_to" do |
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 "xmlrpc/client" | |
server = XMLRPC::Client.new( "TU DOMNIO", "TU ENDPOINT") | |
result = server.call("JOJOJO", 1, 3) | |
puts result.inspect |
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
/// Using NUnit | |
[TestFixture] | |
public class HibernateTitleDaoTests : AbstractDependencyInjectionSpringContextTests { | |
// this instance will be (automatically) dependency injected | |
private HibernateTitleDao titleDao; | |
// a setter method to enable DI of the 'titleDao' instance variable | |
public HibernateTitleDao HibernateTitleDao { |
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
# Sitio 1 | |
class Product < ActiveRecord::Base | |
end | |
class ProductController < ApplicationController | |
respond_to :html, :json, :xml | |
end | |
# Cliente |
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
magnet:?xt=urn:btih:B3BBA01A12D92A1076669DAE70353495491EC7D4&dn=Iron.Sky.2012.DVDRip.XviD-PSiG&tr=http%3a//inferno.demonoid.me%3a3389/announce |
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 user.role? :moderator | |
can :manage, Post | |
can :edit, Comment | |
end | |
if user.role? :admin | |
can :manage, Thread | |
end | |
if user.role? :superadmin | |
can :manage, :all | |
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
SELECT COUNT(*) FROM `products` INNER JOIN `product_variants` ON `product_variants`.`product_id` = products.`id` INNER JOIN `stores` ON `stores`.`id` = products.`store_id` WHERE ((stores.ruc_rus IS NOT NULL and stores.ruc_rus != '') AND (stores.trade_name IS NOT NULL and stores.trade_name != '') AND (stores.cci IS NOT NULL and stores.cci != '') AND (stores.warranty_policies IS NOT NULL and stores.warranty_policies != '')) HAVING ((select count(*) from product_variants join products on product_variants.product_id = products.id where `product_variants`.product_id = products.id) > 0) |
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
private var _tM:Timer; | |
private function sobreSend_clickHandler(e:MouseEvent):void | |
{ | |
// TODO: validaciones | |
Debug.log('STEP4'); | |
_tM = new Timer(100); | |
_tM.addEventListener(TimerEvent.TIMER, t_send_email_handler); | |
_tM.start(); |
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
package edu.upc.sw.servlets; | |
import java.io.IOException; | |
import javax.servlet.ServletException; | |
import javax.servlet.http.HttpServlet; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; | |
/** | |
* Servlet implementation class EcosistemasServlet |