Skip to content

Instantly share code, notes, and snippets.

Avatar

Gerardo Belot gbelot2003

View GitHub Profile
@gbelot2003
gbelot2003 / ssh
Created Aug 8, 2020
configuracion vsftpd ubuntu
View ssh
listen=YES
listen_ipv6=NO
write_enable=YES
local_umask=022
chroot_local_user=YES
seccomp_sandbox=NO
allow_writeable_chroot=YES
userlist_enable=YES
userlist_file=/etc/vsftpd.userlist
userlist_deny=NO
@gbelot2003
gbelot2003 / WordController.php
Created Mar 9, 2020
Ejemplo de usuo de PHPWord con y sin plantillas
View WordController.php
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class WordController extends Controller
{
/**
* Generamos un archivo de word
@gbelot2003
gbelot2003 / docker-compose.yaml
Last active Nov 30, 2019
compose for wordpress
View docker-compose.yaml
version: "3.0"
services:
# Database
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
@gbelot2003
gbelot2003 / sh
Created Aug 18, 2019
extraer filas filtradas de un cvs
View sh
#!/bin/bash
ruta="/home/gerardo/Descargas/xvideos"
ruta2="/home/gerardo/Descargas/limpias"
read -p "Enter Your File Number: " fileNumber
grep "teen" < $ruta"/"xvideo_part"$fileNumber" | grep "creampie" > $ruta2"/creampie."$fileNumber
@gbelot2003
gbelot2003 / php
Created Aug 10, 2019
ExamenesPostTest.php
View php
<?php
namespace Tests\Feature;
use Tests\TestCase;
use Illuminate\Foundation\Testing\WithFaker;
use Illuminate\Foundation\Testing\RefreshDatabase;
class ExamenesPostTest extends TestCase
{
@gbelot2003
gbelot2003 / javascript
Created Jul 22, 2019
Funcion de envio de post acada x tiempo
View javascript
(function schedule() {
background.asyncStuff().then(function() {
console.log('Process finished, waiting 5 minutes');
setTimeout(function() {
console.log('hacer post cada 5 minutos');
this.post("/url/para/ejecutar/logs")
}, 1000 * 60 * 5);
}).catch(err => console.error('error in scheduler', err));
})();
View gist:abcfa74fa77cace00f1610093dbc642c
This issue still exists, but I don't know if this is PMA or something else, anyway as workaround:
```
$ docker-compose exec mysql bash
$ mysql -u root -p
```
You should be able to login as 'root' or your other password.
Execute the following commands:
@gbelot2003
gbelot2003 / StateTest.spec.js
Created Aug 14, 2018
Testing Vuex getters from component
View StateTest.spec.js
import Vuex from 'vuex'
import { shallow, createLocalVue } from 'vue-test-utils'
import State from './State.vue'
const localVue = createLocalVue()
localVue.use(Vuex)
describe('State', () => {
it('renders a value from $store.state', () => {
const wrapper = shallow(State, {
mocks: {
$store: {
@gbelot2003
gbelot2003 / MusicContext.cs
Created Jan 15, 2018
Code Fists EF context and models one to many
View MusicContext.cs
using System.Data.Entity;
namespace WebMigrationTest.Models
{
public class Album
{
[Key] public int AlmbumId { get; set; }
[Required()]
@gbelot2003
gbelot2003 / StartSSL.md
Created May 2, 2017 — forked from mgedmin/StartSSL.md
Free StartSSL.com SSL certificate HOWTO
View StartSSL.md

How to get a free StartSSL.com SSL certificate

I'm writing this up from memory, so errors may appear.

This has been updated to use SHA256 certificates.

Start

  1. Go to http://www.startssl.com/
  2. Click on 'Control Panel'