Skip to content

Instantly share code, notes, and snippets.

View DatabaseNotification.php
<?php
namespace App;
use Illuminate\Notifications\DatabaseNotification as BaseNotification;
class DatabaseNotification extends BaseNotification
{
protected $connection = 'custom_connection';
}
@ItayPodhajcer
ItayPodhajcer / ipfs-aci.yml
Created Jan 19, 2020
ipfs-azure-aci/ipfs-aci.yml
View ipfs-aci.yml
apiVersion: '2018-10-01'
location: 'eastus2'
name: aci-ipfs-example
View person-nested.js
const person = { firstName: 'Devon', lastName: 'Smith', address: { streetNo: 23, town: 'Toronto', country: 'Canada' } };
const { firstName, address: {town, country} } = person;
console.log(`${firstName} is from ${town} ${country}`);
//output: Devon is from Toronto Canada
View keybase.md

Keybase proof

I hereby claim:

  • I am moixbru on github.
  • I am moixbru (https://keybase.io/moixbru) on keybase.
  • I have a public key ASDkjHIp5eK-64MZVXeZ3wIcT8uT5R_HHzgMZ5JFWj-eVgo

To claim this, I am signing this object:

View qwe
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
538ae2fdecd5 redislabs/rebloom:latest "docker-entrypoint.s…" 25 seconds ago Up 23 seconds 0.0.0.0:6379->6379/tcp redis-redisbloom
e286289f9645 minio/minio "/usr/bin/docker-ent…" About a minute ago Up About a minute 0.0.0.0:9000->9000/tcp minio1
7e87a87ec0ec mongo:4.0.4 "docker-entrypoint.s…" 3 minutes ago Up 3 minutes 0.0.0.0:27017->27017/tcp mongo
c7f3002e8049 infinispan/server "./bin/launch.sh" 12 minutes ago Up 12 minutes 2157/tcp, 7800/tcp, 11221/tcp, 45700/tcp, 57600/tcp, 0.0.0.0:11222->11222/tcp wonderful_bra
@koledg
koledg / OOP2.cs
Created Jan 19, 2020
CSLight OOP 2
View OOP2.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CSLight2020
{
class MainClass
{
View pagination.go
func (c *Client) DoPagination(req *http.Request, responses *[]*http.Response) error {
resp, err := c.client.Do(req)
if err != nil {
log.Printf("[Do] error getting response: %+v", err)
return err
}
if resp.StatusCode != http.StatusOK {
msg := fmt.Sprintf("response was not successful: %s", resp.Status)
err := errors.New(msg)
return err
@rust-play
rust-play / playground.rs
Created Jan 19, 2020
Code shared from the Rust Playground
View playground.rs
#![feature(fn_traits)]
#![feature(unboxed_closures)]
fn target_fn_1<F>(f: F)
where F: Fn(&String, &String)
{
f(&"Hello".to_owned(), &"World".to_owned());
}
fn target_fn_2<F>(f: F)
@ProyectG
ProyectG / gist:0cb22de22ede1e9a435f66b99f96475f
Created Jan 19, 2020
Crear un usuario Mysql por comando y asignarselo a una base de datos.
View gist:0cb22de22ede1e9a435f66b99f96475f
Deben tener mysql instalado en su maquina.
1.- Conectarse mysql.
sudo mysql -u root -p
ingresar contraseña.
2.- Ingresar la linea de comando.
create user 'nombreUsuario'@'localhost' identified by 'password'
localhost es la ip de la maquina donde se encuentra el servidor de mysql
remplazar nombreUsuario y password por los correspondientes.
You can’t perform that action at this time.