Skip to content

Instantly share code, notes, and snippets.

View leopic's full-sized avatar

Leo Picado leopic

View GitHub Profile
@leopic
leopic / ui test view example.swift
Created March 8, 2016 14:55
Example of how to type into a textfield
func testExample() {
let app = XCUIApplication()
// Tap on the button on the screen
app.buttons.elementBoundByIndex(0).tap()
// Find the alert
let alert = app.alerts.elementBoundByIndex(0)
// Find the textfield
<?php
// Variables:
$cadenaDeTexto = "Hola Mundo!";
$numero = 4;
$arregloDeTexto = ["uno", "dos", "tres", "catorce"];
define("CONSTANTE", "VALOR QUE NUNCA CAMBIA");
$nombre = null;
$algunaCondicion = true;
// (var|let) nombre:[tipo] = valor
// Variable: su valor cambiará dentro del programa
var cadenaDeTexto = "Hola Mundo!"
// Constante: su valor no cambiará
let numero = 4
// Arreglo de Strings
let arregloDeTexto = ["uno", "dos", "tres", "catorce"]
@leopic
leopic / conf.js
Last active August 29, 2015 14:27
protractor setup
exports.config = {
directConnect: true,
chromeDriver: '/usr/bin/chromedriver',
specs: ['protractor-test.js']
};
@leopic
leopic / Gruntfile.js
Created August 7, 2015 19:14
make a list of all the stylesheets that need to be processed, then start cranking away
/**
* Generates our CSS files using libsass.
* Wrapper for the `sass` task, make sure you have installed all the dependencies of the repo.
*
* Example: $: grunt libsass
* $: grunt libsass:dev
*
* @param env
*/
grunt.registerTask('libsass', 'Builds our CSS', function(env) {
@leopic
leopic / properties.swift
Created June 24, 2015 05:59
If you assign an instance of a reference type to a constant, you can still change that instance’s variable properties.
class Persona { var nombre:String? }
let alejo = Persona()
alejo.nombre = "Alejo"
if let nombre = alejo.nombre {
println(nombre)
}
var hero = [String](count: 7, repeatedValue: "Na")
hero.append("Batman")
@leopic
leopic / docker-compose.yml
Created April 25, 2015 16:18
simple docker compose for wordpress
wordpress:
image: wordpress
links:
- db:mysql
ports:
- 8080:80
volumes:
- .:/var/www/html
db:
image: mariadb
@leopic
leopic / lb.log
Created March 25, 2015 06:00
load balancing log
24 Mar 23:59:31 - [nodemon] restarting due to changes...
24 Mar 23:59:31 - [nodemon] starting `node bin/www`
Balanced to boot2docker:4000
Balanced to localhost:4400
Balanced to localhost:4400
Balanced to localhost:4400
Balanced to boot2docker:4000