Skip to content

Instantly share code, notes, and snippets.

View gbelot2003's full-sized avatar
🎃
Working

Gerardo Belot gbelot2003

🎃
Working
View GitHub Profile
@gbelot2003
gbelot2003 / install-composer.sh
Created February 26, 2016 17:52 — forked from matthewpizza/install-composer.sh
Install Composer on Webfaction
cd $HOME
ln -s `which php56` ~/bin/php
export PATH=$HOME/bin:$PATH
curl -sS https://getcomposer.org/installer | php56
echo -e "\n# Composer\nalias composer=\"php56 \$HOME/composer.phar\"" >> $HOME/.bash_profile
source $HOME/.bash_profile
@gbelot2003
gbelot2003 / webpack.config.js
Created April 4, 2016 23:58 — forked from learncodeacademy/webpack.config.js
Sample Basic Webpack Config
var debug = process.env.NODE_ENV !== "production";
var webpack = require('webpack');
module.exports = {
context: __dirname,
devtool: debug ? "inline-sourcemap" : null,
entry: "./js/scripts.js",
output: {
path: __dirname + "/js",
filename: "scripts.min.js"
@gbelot2003
gbelot2003 / .bashrc
Created June 25, 2016 22:36
Fedora 23 bashrc
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=
@gbelot2003
gbelot2003 / .emacs
Last active July 16, 2016 07:24
my .emacs cofiguration
(load-theme 'wombat)
(setq frame-title-format "emacs")
(load-theme 'wombat)
(setq frame-title-format "emacs")
;(menu-bar-mode -1)
;(tool-bar-mode -1)
(scroll-bar-mode -1)
(set-default 'cursor-type 'hbar)
(ido-mode)
(column-number-mode)
@gbelot2003
gbelot2003 / StartSSL.md
Created May 2, 2017 06:14 — forked from mgedmin/StartSSL.md
Free StartSSL.com SSL certificate HOWTO

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'
@gbelot2003
gbelot2003 / MusicContext.cs
Created January 15, 2018 03:53
Code Fists EF context and models one to many
using System.Data.Entity;
namespace WebMigrationTest.Models
{
public class Album
{
[Key] public int AlmbumId { get; set; }
[Required()]
@gbelot2003
gbelot2003 / StateTest.spec.js
Created August 14, 2018 18:11
Testing Vuex getters from component
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 / gist:abcfa74fa77cace00f1610093dbc642c
Created February 19, 2019 23:51
fix laradock mysql connection
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 / javascript
Created July 22, 2019 17:06
Funcion de envio de post acada x tiempo
(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));
})();
@gbelot2003
gbelot2003 / php
Created August 10, 2019 19:19
ExamenesPostTest.php
<?php
namespace Tests\Feature;
use Tests\TestCase;
use Illuminate\Foundation\Testing\WithFaker;
use Illuminate\Foundation\Testing\RefreshDatabase;
class ExamenesPostTest extends TestCase
{