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
import React, {useState, useContext} from 'react'; | |
import {css} from '@emotion/core'; | |
import Router, {useRouter} from "next/router"; | |
import Layout from "../components/layout/Layout"; | |
import {Formulario, Campo, InputSubmit, Error} from "../components/ui/Formulario"; | |
import FileUploader from "react-firebase-file-uploader"; | |
import firebase from "../firebase/firebase"; | |
import {FirebaseContext} from '../firebase'; |
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
#Extensive definition | |
'mongodb' => [ | |
'driver' => 'mongodb', | |
'host' => env('MONGO_HOST', 'localhost'), | |
'port' => env('MONGO_PORT', 27017), | |
'database' => env('MONGO_DATABASE', 'default'), | |
'username' => env('MONGO_USERNAME', ''), | |
'password' => env('MONGO_PASSWORD', ''), | |
'options' => [ | |
// here you can pass more settings to the Mongo Driver Manager |
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
public function makeCSV($data, $group) { | |
$file_name = storage_path('app/tmp/' . uniqid($group . '_') . '.csv');; | |
$file = fopen($file_name, 'w'); | |
$headers = array_keys(reset($data)); | |
fputcsv($file, $headers); | |
foreach ($data as $fields) { | |
fputcsv($file, $fields); | |
} | |
fclose($file); | |
$gz_file = $file_name . '.gz'; |
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
import axios from 'axios'; | |
import store from './../store/index'; | |
import Swal from 'sweetalert2'; | |
const http = axios.create({ | |
baseURL: process.env.VUE_APP_API_URL, | |
headers: { | |
Authorization: 'Bearer ' + store.getters.token, | |
}, | |
}); |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title> | |
</head> | |
<body> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script> | |
<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
#! /bin/bash | |
# ECHO COMMAND | |
# echo Hello World! | |
# VARIABLES | |
# Uppercase by convention | |
# Letters, numbers, underscores | |
NAME="Bob" | |
# echo "My name is $NAME" |
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 | |
// Load WordPress | |
require_once '../wp-load.php'; | |
require_once ABSPATH . '/wp-admin/includes/taxonomy.php'; | |
// Set the timezone so times are calculated correctly | |
date_default_timezone_set('Europe/London'); | |
// Create post | |
$titulo = $_POST['titulo']; | |
$cotenido = $_POST['contenido']; |
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
package com.curiousapps.comunidad.activities; | |
import android.content.Context; | |
import android.graphics.Bitmap; | |
import android.graphics.Color; | |
import android.os.AsyncTask; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.util.Log; | |
import android.view.LayoutInflater; |