Skip to content

Instantly share code, notes, and snippets.

View jque's full-sized avatar
🏠
Working from home

Jorge Queiruga jque

🏠
Working from home
View GitHub Profile
#!/usr/bin/env ruby
# encoding: UTF-8
#
# LearnRubyByExample:
#
# Ruby is a highly expressive programming language.
# Testing software is an expressive way to communicate how it works.
#
# In the middle of a night awake for allergy and insomnia, and some days after the 1st _why day,
# I've tried to combine Ruby and testing to help teaching ruby with some goals in mind:
framework 'Cocoa'
framework 'WebKit'
class Cat
attr_accessor :name, :age
def initialize(name = 'kitty', age=42)
@name = name
@age = age
end
@jque
jque / schema.rb
Created February 15, 2011 07:35 — forked from stympy/schema.rb
ActiveRecord::Schema.define(:version => 20100824224246) do
create_table "users", :force => true do |t|
t.string "name"
t.text "friend_list"
t.datetime "created_at"
t.datetime "updated_at"
end
end
Rails.application.config.to_prepare do
SubscriptionPlan.class_eval do
scope :active, where(:active => true)
scope :by_price, order(:amount)
end
end
@jque
jque / api.js
Created May 20, 2013 21:02 — forked from fwielstra/api.js
/* The API controller
Exports 3 methods:
* post - Creates a new thread
* list - Returns a list of threads
* show - Displays a thread and its posts
*/
var Thread = require('../models/thread.js');
var Post = require('../models/post.js');
<!-- Physics shaders -->
<script id="physics-vert" type="x-vertex-shader">
attribute vec2 aVertexPosition;
void main() {
gl_Position = vec4( aVertexPosition, 1, 1 );
}
<link href='http://fonts.googleapis.com/css?family=Droid+Sans:700|Droid+Serif' rel='stylesheet' type='text/css'>
<div id="banner">
<div id="bannertext">
<h1>PARAL &amp; LAX</h1>
<p>Finest webdesign since 1870</p>
</div>
</div>
<div id="content">
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/
// author: Pawel Kozlowski
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"
#En una consola ...
rails new prueba
cd prueba
rails g scaffold factura referencia:string
rails g scaffold factura_linea importe:decimal factura_id:integer
rake db:migrate
# Modificamos los modelos
@jque
jque / PPWKpy.markdown
Created September 30, 2015 10:57
PPWKpy