Skip to content

Instantly share code, notes, and snippets.

function get_pwd() {
print -D $PWD
}
function battery_charge() {
if [ -e ~/bin/batcharge.py ]
then
echo `python ~/bin/batcharge.py`
else
echo ''
require 'sinatra'
require 'aws/s3'
module S3Config
bucket = 'assets.baymachine.com'
s3_key = '1B7JJ1RZXMZP7VQADY02'
s3_secret = '8UvZq1RtsyE72t0vq2U1FaaZStGXm9fj87uFub2b'
end
post "/convert_to" do
require "xmlrpc/client"
server = XMLRPC::Client.new( "TU DOMNIO", "TU ENDPOINT")
result = server.call("JOJOJO", 1, 3)
puts result.inspect
/// 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 {
# Sitio 1
class Product < ActiveRecord::Base
end
class ProductController < ApplicationController
respond_to :html, :json, :xml
end
# Cliente
magnet:?xt=urn:btih:B3BBA01A12D92A1076669DAE70353495491EC7D4&dn=Iron.Sky.2012.DVDRip.XviD-PSiG&tr=http%3a//inferno.demonoid.me%3a3389/announce
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
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)
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();
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