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
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
require_once APPPATH.'models/Entity_model.php'; | |
/** | |
* Member_model | |
* Clase miembro | |
*/ | |
class Member_model extends Entity_model { | |
/** |
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
Prefix Verb URI Pattern Controller#Action | |
groups_api_branch POST /api/branches/:id/groups(.:format) api/v1/branches#assign_groups {:format=>:json} | |
toggle_api_branch POST /api/branches/:id/toggle(.:format) api/v1/branches#toggle_is_active {:format=>:json} | |
api_branch GET /api/branches/:id(.:format) api/v1/branches#show {:format=>:json} | |
PATCH /api/branches/:id(.:format) api/v1/branches#update {:format=>:json} | |
PUT /api/branches/:id(.:format) api/v1/branches#update {:format=>:json} | |
branches_api_clients POST /api/clients/branches(.:format) api/v1/clients#create_branch {:format=>:json} | |
GET /api/clients/branches(.:format) api/v1/clients#index_branch {:format=>:json} | |
limits_api_client POST /api/clients/:id/limits(.:format) api/v1/admins#limit_assets |
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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.teamcompass.app" | |
android:versionCode="3" | |
android:versionName="1.2" > | |
<uses-sdk | |
android:minSdkVersion="16" | |
android:targetSdkVersion="20" /> |
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
gamanox@gamanox-lt:~/Downloads$ jarsigner -verify -verbose:summary -certs tc-gabriel.apk | |
sm 396 Wed Mar 25 16:51:26 CST 2015 res/anim/abc_fade_in.xml (and 666 more) | |
X.509, CN=Rafael Jacobo, OU=Android, O=Axented, L=Monterrey, ST=Nuevo Leon, C=MX | |
[certificate is valid from 12/18/14 3:02 PM to 12/12/39 3:02 PM] | |
[CertPath not validated: Path does not chain with any of the trust anchors] | |
s 70033 Wed Mar 25 16:51:28 CST 2015 META-INF/MANIFEST.MF |
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
rails g scaffold beer name description:text image:attachment family_id:integer style_id:integer alcohol:integer country_id:integer state brewery_id rating:integer --skip-stylesheets | |
rails g scaffold brewery name description:text image:attachment --skip-stylesheets | |
rails g scaffold store name description:text image:attachment phone:integer address:text location_id:integer twitter facebook foursquare instagram --skip-stylesheets | |
rails g scaffold family name description:text image:attachment --skip-stylesheets | |
rails g scaffold style name description:text image:attachment --skip-stylesheets | |
rails g scaffold tag name description:text --skip-stylesheets | |
rails g scaffold location name code:integer --skip-stylesheets | |
rails g scaffold storetype name description:text --skip-stylesheets | |
rails g scaffold price beer_id:integer store_id:integer price:decimal{4,2} --skip-stylesheets |
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
Country.create([{name: "Afghanistan",alpha: "AFG",code: "004"},{name: "Åland Islands",alpha: "ALA",code: "248"},{name: "Albania",alpha: "ALB",code: "008"},{name: "Algeria",alpha: "DZA",code: "012"},{name: "American Samoa",alpha: "ASM",code: "016"},{name: "Andorra",alpha: "AND",code: "020"},{name: "Angola",alpha: "AGO",code: "024"},{name: "Anguilla",alpha: "AIA",code: "660"},{name: "Antarctica",alpha: "ATA",code: "010"},{name: "Antigua and Barbuda",alpha: "ATG",code: "028"},{name: "Argentina",alpha: "ARG",code: "032"},{name: "Armenia",alpha: "ARM",code: "051"},{name: "Aruba",alpha: "ABW",code: "533"},{name: "Australia",alpha: "AUS",code: "036"},{name: "Austria",alpha: "AUT",code: "040"},{name: "Azerbaijan",alpha: "AZE",code: "031"},{name: "Bahamas",alpha: "BHS",code: "044"},{name: "Bahrain",alpha: "BHR",code: "048"},{name: "Bangladesh",alpha: "BGD",code: "050"},{name: "Barbados",alpha: "BRB",code: "052"},{name: "Belarus",alpha: "BLR",code: "112"},{name: "Belgium",alpha: "BEL",code: "056"},{name: "Belize",alpha |
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
def get_collection(model_config, scope, pagination) | |
associations = model_config.list.fields.select { |f| f.type == :belongs_to_association && !f.polymorphic? }.collect { |f| f.association.name } | |
options = {} | |
options = options.merge(page: (params[Kaminari.config.param_name] || 1).to_i, per: (params[:per] || model_config.list.items_per_page)) if pagination | |
options = options.merge(include: associations) unless associations.blank? | |
options = options.merge(get_sort_hash(model_config)) | |
options = options.merge(query: params[:query]) if params[:query].present? | |
options = options.merge(filters: params[:f]) if params[:f].present? | |
options = options.merge(bulk_ids: params[:bulk_ids]) if params[:bulk_ids] | |
model_config.abstract_model.all(options, scope) |
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
sortSome = (array)-> | |
#pusharray | |
pusharray = [] | |
#save the object in an array | |
for position of array | |
pusharray.push [ | |
position | |
array[position] | |
] | |
#sort the array by values |
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
<script> | |
var section_counter=1; | |
var questions=0; | |
var can_pass=0; | |
</script> |
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
CREATE FUNCTION deletecompita() RETURNS TRIGGER AS $_$ | |
BEGIN | |
DELETE FROM events_users WHERE user_id = OLD.id; | |
RETURN OLD; | |
END $_$ LANGUAGE 'plpgsql'; | |
CREATE TRIGGER delete_user | |
AFTER DELETE ON users | |
FOR EACH ROW | |
EXECUTE PROCEDURE deletecompita(); |