Skip to content

Instantly share code, notes, and snippets.

View FraGoTe's full-sized avatar
🏠
Working from home

Francis Gonzales FraGoTe

🏠
Working from home
  • Lima, Perú
  • 01:18 (UTC -05:00)
View GitHub Profile
@FraGoTe
FraGoTe / pu2s3.php
Created June 6, 2022 15:33 — forked from vaibhavpandeyvpz/pu2s3.php
Upload files from public (or any) disk to AWS S3 in Laravel without using any external tools.
<?php
use Illuminate\Support\Facades\Storage;
$public = Storage::disk('public');
$s3 = Storage::disk('s3');
$files = $public->files(null, true);
foreach ($files as $file) {
@FraGoTe
FraGoTe / mysql-docker.sh
Created August 18, 2020 22:42 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
FROM php:7.2-apache
RUN apt-get update \
&& apt-get install -y vim \
&& apt-get install -y git zlib1g-dev \
&& apt-get install -y libxml2-dev \
&& apt-get install -y libpng-dev
# Getting
WORKDIR /var/www/
# Use root/example as user/password credentials
# docker-compose up
version: '3.1'
services:
adminer:
image: adminer
restart: always
ports:
- 8099:8080
install.packages("readxl")
library("readxl")
data <- read_excel("BASE_ALERTAS_2.xlsx",sheet=2)
table(data$TARGET)
#Se elimina la columna del codigo del cliente
data$ID_CLIENTE <- NULL
#Se eliminan las columnas que contienen valores en 0
<?php
/**
* Generar nuevo documentos
*
* @param serviceLocator $serviceLocator
* @param string $preDocumento
* @param string $nroDocumento
* @param string $rucEmpresa
* @param string $razEmpresa
<?php
$technorati = new Zend_Rest_Client('http://api.technorati.com/bloginfo');
$technorati->key($key);
$technorati->url('http://pixelated-dreams.com');
$result = $technorati->get();
echo $result->firstname() .' '. $result->lastname();
$technorati->getHttpClient()->setHeaders(
array('user' => 'uewirydjfhkjds22VVhdhZhd',
<?php
$client = new Zend_Http_Client();
$client->setMethod(Zend_Http_Client::POST);
$client->setUri('http://www.example.com/api/type/');
$client->setParameterPost(array(
'useremail' => '******@*****.***',
'apikey' => 'secretkey',
'description' => 'TEST WEB API',
'amount' => '5000.00'
#include <iostream>
using std::cout;
using std::endl;
class Increment {
public:
Increment( int c = 0, int i = 1 ); // default constructor
#include <iostream>
#include <string>
using namespace std;
class Mascota
{
public:
Mascota(string nombre, int patas);
string hablar();