Skip to content

Instantly share code, notes, and snippets.

View galileoguzman's full-sized avatar
🤓
Making the world programmable

Galileo Guzmán galileoguzman

🤓
Making the world programmable
View GitHub Profile
@galileoguzman
galileoguzman / reto_video_02.py
Created February 16, 2015 05:46
Reto del vídeo Django y Python [02] de @ajamaica
def suma_e_imprime(val1, val2):
print "EL RESULTADO ES ", val1 + val2
suma_e_imprime(678, 890.7)
@galileoguzman
galileoguzman / ArticuloController.php
Last active August 29, 2015 14:17
Controller Post Laravel
<?php
class ArticuloController extends BaseController {
public function index()
{
$articulos = Articulo::orderBy('created_at', 'DESC')->get();
$total = Articulo::count();
// load the view and pass the nerds
return View::make('articulos.index')->with(array('articulos' => $articulos, 'total' => $total));
@galileoguzman
galileoguzman / .htaccess
Created May 14, 2015 13:23
.htaccess for laravel 4
# ----------------------------------------------------------------------
# ROOT/ folder .htaccess
# ----------------------------------------------------------------------
# Laravel Note:
# Note: Laravel is designed to protect your application code,
# and local storage by placing only files that are necessarily
# public in the public folder. It is recommended that you either
# set the public folder as your site's documentRoot (also known as a web root)
# or to place the contents of public into your site's root directory
# and place all of Laravel's other files outside the web root.
//: Playground - noun: a place where people can play
import UIKit
var str = "Hello, playground"
print("El valor de numero es ")
let y: Int = 120
@galileoguzman
galileoguzman / ciclos_swift.swift
Created August 11, 2015 14:22
ciclos en swift
//: Playground - noun: a place where people can play
import UIKit
//Iterar
// ForEach recomendado para colecciones
// rangos define una coleccion, en este caso de enteros
for i in 1...3 {
print("hola \(i)")
@galileoguzman
galileoguzman / condiciones_swift.swift
Created August 12, 2015 13:44
Condiciones básicas en SWIFT
//: Playground - noun: a place where people can play
import UIKit
// condiciones
var puntos = 0
if puntos > 0{
print("Ganaste")
@galileoguzman
galileoguzman / switch_case_swift.swift
Created August 12, 2015 14:06
Uso del condicional SWITCH
//: Playground - noun: a place where people can play
import UIKit
// switch
let personaje: String = "Lobo Estepario"
switch personaje{
case "Caballero":
@galileoguzman
galileoguzman / TicketController.php
Created August 20, 2015 20:51
Controller of Ticket Object from ticket system
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use App\MayestroModels\Ticket;
@galileoguzman
galileoguzman / new.ticket.jquery.js
Created August 20, 2015 20:53
Client of Ticket System API
/*
* New Ticket Jquery
* Is a file for get content of div#new-ticket
* And send to backend with laravel.
**/
$(document).on('ready', begin);
function begin()
{