Skip to content

Instantly share code, notes, and snippets.

View angelsystem's full-sized avatar

angel roberto angelsystem

View GitHub Profile
@angelsystem
angelsystem / ajax.html
Last active August 29, 2015 13:59
datatable filter no work
<!DOCTYPE html>
<html>
<!--
Created using jsbin.com
Source can be edited via http://jsbin.com/dusuhoju/3/edit
-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Yet Another DataTables Column Filter (Yadcf) Showcase</title>
@angelsystem
angelsystem / gist:11298664
Created April 25, 2014 18:22
log nested form
Block Load (0.5ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."project_id" = 33 ORDER BY name
Unit Load (5.8ms) SELECT "units".* FROM "units" WHERE "units"."project_id" = 33 ORDER BY id
PriceList Load (0.8ms) SELECT "price_lists".* FROM "price_lists" WHERE "price_lists"."project_id" = 33 AND (price_list_status = 'approved') ORDER BY created_at DESC LIMIT 1
UnitPrice Load (1.6ms) SELECT "unit_prices".* FROM "unit_prices" WHERE "unit_prices"."price_list_id" = 145
Rendered price_lists/new.html.haml within layouts/application (1417.6ms)
@angelsystem
angelsystem / ViewController.swift
Last active August 29, 2015 14:08
use image galley or camera swift
//
// ViewController.swift
// instagram
//
// Created by Angelito Rojas on 25/10/14.
// Copyright (c) 2014 Angelito Rojas. All rights reserved.
//
import UIKit
@angelsystem
angelsystem / alert.swift
Created October 26, 2014 04:17
Alert swift IOs
//
// ViewController.swift
// spiner-alert
//
// Created by Angelito Rojas on 25/10/14.
// Copyright (c) 2014 Angelito Rojas. All rights reserved.
//
import UIKit
@angelsystem
angelsystem / spiner.swift
Created October 26, 2014 04:22
spinner swift IOs
//
// ViewController.swift
// spiner-alert
//
// Created by Angelito Rojas on 25/10/14.
// Copyright (c) 2014 Angelito Rojas. All rights reserved.
//
import UIKit
@angelsystem
angelsystem / ViewController.swift
Created November 5, 2014 04:51
keyboard hide touch screen
import UIKit
class ViewController: UIViewController {
override func touchesBegan(touches: NSSet, withEvent event: UIEvent) {
self.view.endEditing(true)
}
@angelsystem
angelsystem / ViewController.swift
Created November 5, 2014 04:55
keyboard hide button return
import UIKit
class ViewController: UIViewController, UITextFieldDelegate {
@IBOutlet var password: UITextField! //create a delegate in storyboard with viewcontroller and textfield
func textFieldShouldReturn(textField: UITextField) -> Bool {
password.resignFirstResponder()
return true
}
@angelsystem
angelsystem / sumar.rb
Created November 7, 2014 01:34
demo suma
class SumarDigitos
def sumar_numbers(number)
sum = 0
number.to_s.each_char do |n|
sum = sum + (n.to_i)
end
sum
end
require 'rails_helper'
RSpec.describe 'creating_seller_profile', type: :feature do
context 'create a new seller profile', js: true do
let!(:seller) { create(:seller) }
before do
log_in_as_seller(seller)
end
it 'should create a seller profile' do
visit new_seller_seller_profile_path(seller)
a {
colour: brand-colour(blue);
&:hover {
colour: brand-colour(blue, dark);
}
}