Skip to content

Instantly share code, notes, and snippets.

View jhernan33's full-sized avatar

Hernan jhernan33

  • venezuela
View GitHub Profile
import 'package:flutter/material.dart';
class StepperDemo extends StatefulWidget {
@override
_StepperDemoState createState() => _StepperDemoState();
}
class _StepperDemoState extends State<StepperDemo> {
int _currentStep = 0;
StepperType stepperType = StepperType.vertical;
SELECT
t1.TABLE_NAME AS tabla_nombre,
t1.COLUMN_NAME AS columna_nombre,
t1.COLUMN_DEFAULT AS columna_defecto,
t1.IS_NULLABLE AS columna_nulo,
t1.DATA_TYPE AS columna_tipo_dato,
COALESCE(t1.NUMERIC_PRECISION,
t1.CHARACTER_MAXIMUM_LENGTH) AS columna_longitud,
PG_CATALOG.COL_DESCRIPTION(t2.OID,
t1.DTD_IDENTIFIER::int) AS columna_descripcion,
@sryabov
sryabov / autocomplete.vue
Created June 20, 2018 20:07
vuetify autocomplete component example
<template>
<v-autocomplete
v-model="select"
:loading="loading"
:items="items"
:search-input.sync="search"
no-filter
hide-selected
clearable
return-object
@stubailo
stubailo / server.js
Last active March 12, 2018 15:13
Engine setup with Apollo Server
// Install and import the apollo-engine package
const { ApolloEngine } = require('apollo-engine');
const { graphqlExpress } = require('apollo-server-express');
const app = express();
// Enable tracing and cacheControl in Apollo Server
app.use('/graphql', graphqlExpress({
tracing: true,
cacheControl: true,
@taniarascia
taniarascia / git-deploy.bash
Last active March 31, 2020 09:29
Track, commit, and push to git origin and development with bash script
#!/bin/bash
read -r -p 'Commit message: ' ${desc} # prompt user for commit message
git add . # track all files
git add -u # track all deleted files
git commit -m "$desc" # commit with message
git push origin master # push to origin
git push production master # push to development server
@GhazanfarMir
GhazanfarMir / Instructions.sh
Last active December 22, 2024 01:12
Install PHP7.2 NGINX and PHP7.2-FPM on Ubuntu 16.04
########## Install NGINX ##############
# Install software-properties-common package to give us add-apt-repository package
sudo apt-get install -y software-properties-common
# Install latest nginx version from community maintained ppa
sudo add-apt-repository ppa:nginx/stable
# Update packages after adding ppa
@MatteoOreficeIT
MatteoOreficeIT / LaravelQueryJoinRelations.php
Last active October 14, 2023 08:45
Laravel Query Join through Relations
<?php
/**
* User: matteo.orefice
* Date: 16/02/2018
* Time: 16:57
*/
namespace MatteoOrefice\Illuminate\Database\Eloquent\Concerns;
@levsthings
levsthings / docker-ce-ubuntu-17.10.md
Last active April 13, 2023 21:05
Install Docker CE on Ubuntu 17.10

Installing Docker CE on Ubuntu 17.10 Artful Aardvark

As of 20/10/2017, a release file for Ubuntu 17.10 Artful Aardvark is not available on Download Docker.

If you are used to installing Docker to your development machine with get-docker script, that won't work either. So the solution is to install Docker CE from the zesty package.

sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
@alistairewj
alistairewj / install-postgres-10-ubuntu.md
Last active October 3, 2024 00:19
Install PostgreSQL 10 on Ubuntu

Install PostgreSQL 10 on Ubuntu

This is a quick guide to install PostgreSQL 10 - tested on Ubuntu 16.04 but likely can be used for Ubuntu 14.04 and 17.04 as well, with one minor modification detailed below.

(Optional) Uninstall other versions of postgres

To make life simple, remove all other versions of Postgres. Obviously not required, but again, makes life simple. If you have data in your previous version of postgres that you'd like to retain, then this is not recommended. Instead, you'll have to use pg_upgrade or pg_upgradecluster.

'use strict';
module.exports = function(sequelize, DataTypes) {
var user = sequelize.define('user', {
id:{
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: DataTypes.INTEGER
},
username: DataTypes.INTEGER,