Skip to content

Instantly share code, notes, and snippets.

View DannyFeliz's full-sized avatar
💻
Building things 👨‍💻

Danny Feliz DannyFeliz

💻
Building things 👨‍💻
View GitHub Profile
@DannyFeliz
DannyFeliz / Consultas
Last active August 29, 2015 14:07
Retorna los valores de los cines
SELECT nod.title as `Titulo`, dur.field_duracion_value as `Duracion`, tx.name as `Director`, sip.field_sinopsis_value as `Sinopsis`, rep.field_reparto_value as `Reparto` ,
vid.field_video_fid as `ID Trailer`, fly.field_movie_flyer_fid as `ID Flyter`, /*gen.field_genero_tid as `ID Genero`*/
/*,sal.field_salas_cine_value as `ID Salas`,*/filem.filename as `Nombre Flyer`, filem.uri as `Path Flyer`, fil.filename as `Titulo Trailer`, fil.uri as `Path Video`
FROM node nod
JOIN field_data_field_duracion dur ON dur.entity_id = nod.nid
JOIN taxonomy_index ti ON ti.nid = nod.nid
JOIN taxonomy_term_data tx ON tx.tid = ti.tid
JOIN field_data_field_director dir ON tx.tid = dir.field_director_tid
JOIN field_data_field_sinopsis sip ON sip.entity_id = nod.nid
JOIN field_data_field_reparto rep ON rep.entity_id = nod.nid
Para quien no lo leyó, he aquí el post!
Me banean por esto ?
Quiero compartir esta experiencia, pues no tiene sentido pasar un mal momento si no lo vas a compartir con otros y de esta manera evitar que otros pasen por la misma situación. Hace unos días apliqué para una vacante que me resultó bien interesante, la misma buscaba un perfil bien parecido al mio, alguien que pueda diseñar y programar. Cabe destacar que apliqué a esta vacante debido a que la empresa que publicaba la vacante tiene fama de trabajar remoto y de ser una empresa buena onda. Menciono esto, pues actualmente tengo un buen empleo, no es que estoy necesitado de un empleo, sino, que nunca está de más asumir nuevos retos, trabajar con gente que según los comentarios son buena onda, (y me consta que lo son pues tuve una buena experiencia con ellos o mejor dicho con personas asociados a ellos), y además de esto, hacer buen dinero (Pues es obvio que trabajamos para generar más ingresos duh!).
Bueno, para no cansar el cuento, luego de varios cues
@DannyFeliz
DannyFeliz / gist:584545341a24cd080697
Created October 13, 2015 16:32
show branch name in command line
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
BLUE="\[\033[00m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[01;32m\]"
NO_COLOR="\[\033[0m\]"
OTHER="\[\033[01;36m\]"
@DannyFeliz
DannyFeliz / sort.c
Last active May 22, 2016 02:12
Soft array alphabetically
#include <stdio.h>
#include <string.h>
int main(void) {
char *names[] = {"Danny", "Florida", "Oregon", "Gaby", "Califoria", "Georgia", "Octavio", "Ana"};
int namesLength = (int)( sizeof(names) / sizeof(names[0]) );
for (int i = 0; i < namesLength; i++) {
for (int j = i+1; j < namesLength; j++) {
if (strcmp(names[i], names[j]) > 0) {
char* temp = names[i];
@DannyFeliz
DannyFeliz / users_tables.sql
Last active July 10, 2016 00:44
User tables
CREATE TABLE [dbo].[Users]
(
[id] INT NOT NULL PRIMARY KEY IDENTITY,
[name] NVARCHAR(50) NOT NULL,
[last_name] NVARCHAR(75) NOT NULL,
[username] NVARCHAR(50) NOT NULL,
[password] NVARCHAR(100) NOT NULL,
[role] INT NOT NULL
)
@DannyFeliz
DannyFeliz / VagrantConfig.md
Last active March 1, 2017 02:49
Vagrant.config

Vagrant Meteor Development Environment Installation & Configuration

Overview

Only the VirtualBox and Vagrant versions specified below will work. Later versions have problems, so do not try to use them (we tried almost all of them).

Vagrant Installation

  • Install VirtualBox version 4.2.24, from here
@DannyFeliz
DannyFeliz / response.crentro.costo.con.elementos.json
Last active March 25, 2017 01:07
Respuesta de centro de costos
// Campo: esta_en_uso = true|false
// URL: http://oorden.io/apiv2?modelo=centro-costo&include=centroCosto.elementos
{
"status": {
"type": "SUCCESS",
"message": "Lista de resultados"
},
"data": [
{
@DannyFeliz
DannyFeliz / apec-assistant.js
Created August 22, 2017 13:07
APEC Assistant
/*Danny Feliz - 20152015*/"use strict";function _defineProperty(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}var styles="\n <style>\n .bg-white {\n background-color: white;\n }\n\n .up-arrow {\n border: solid black;\n border-width: 0 3px 3px 0;\n display: inline-block;\n padding: 3px;\n transform: rotate(-135deg);\n -webkit-transform: rotate(-135deg);\n }\n\n .text-green {\n color: darkgreen;\n }\n\n .text-red {\n color: darkred;\n }\n\n .available-size {\n font-size: xx-large;\n text-align: center;\n }\n\n .text-center {\n text-align: center;\n }\n\n .scroll3{\n width: 100%;\n position: relative;\n overflow: visible;\n }\n </style>\n";$("body").append(styles);var courseInformation=[],daysOfWeek={L:"LUNES",K:"MARTES",M:"MI\xC9RCOLES",J:"JUEVES",V:"VIERNES",S:"S\xC1BADO",D:"DOMINGO"},MAX_HEIGHT_AL
@DannyFeliz
DannyFeliz / timeout.js
Last active August 4, 2018 03:43
for loop with timeout
const timeoutList = [5000, 2500, 4500];
async function initInterval() {
for(const timeout of timeoutList) {
await runTimeout(timeout);
}
}
function runTimeout(timeout) {
return new Promise(resolve => {