Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Francis Gonzales FraGoTe

🏠
Working from home
View GitHub Profile
View RestClient.php
<?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',
View test
<?php
/**
* Generar nuevo documentos
*
* @param serviceLocator $serviceLocator
* @param string $preDocumento
* @param string $nroDocumento
* @param string $rucEmpresa
* @param string $razEmpresa
View TrabajoMineria.R
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
View docker-compose.yml
# Use root/example as user/password credentials
# docker-compose up
version: '3.1'
services:
adminer:
image: adminer
restart: always
ports:
- 8099:8080
View Dockerfile
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/
@FraGoTe
FraGoTe / mysql-docker.sh
Created Aug 18, 2020 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
View mysql-docker.sh
# 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
@FraGoTe
FraGoTe / pu2s3.php
Created Jun 6, 2022 — forked from vaibhavpandeyvpz/pu2s3.php
Upload files from public (or any) disk to AWS S3 in Laravel without using any external tools.
View pu2s3.php
<?php
use Illuminate\Support\Facades\Storage;
$public = Storage::disk('public');
$s3 = Storage::disk('s3');
$files = $public->files(null, true);
foreach ($files as $file) {