Skip to content

Instantly share code, notes, and snippets.

View Signorini's full-sized avatar

Felipe Klerk Signorini Signorini

View GitHub Profile
@Signorini
Signorini / appendices_resources.patch
Created December 13, 2014 15:09
[Translation Fest] - appendices/resources.php - Felipe Signorini
Index: appendices/resources.xml
===================================================================
--- appendices/resources.xml (revision 335261)
+++ appendices/resources.xml (working copy)
@@ -1,15 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<appendix xml:id="resource" xmlns="http://docbook.org/ns/docbook">
- <title>List of Resource Types</title>
+ <title>Lista de tipos de recursos no PHP</title>
@Signorini
Signorini / apendice_configure_servers.patch
Last active August 29, 2015 14:11
Tradução Apêndices - Configure/servers.xml [Felipe Signorini <[email protected]>]
Index: appendices/configure/servers.xml
===================================================================
--- appendices/configure/servers.xml (revision 335261)
+++ appendices/configure/servers.xml (working copy)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- EN-Revision: 304722 Maintainer: klaussilveira Status: ready -->
+<!-- EN-Revision: 304722 Maintainer: klaussilveira Status: ready --><!-- CREDITS: Felipe Signorini -->
<sect3 xml:id="configure.options.servers" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Opções SAPI</title>
@Signorini
Signorini / featured_safe_mode.patch
Created December 15, 2014 17:29
[TranslateFest 2014] - São Paulo - Featured, Safe Mode
@Signorini
Signorini / cors.php
Created July 16, 2015 19:51
Middleware - Cors implemetation
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Response;
class Cors
{
/**
@Signorini
Signorini / gist:9a960c4fc107ca915b362c928489b800
Created December 7, 2016 13:20
Docker instalation - Jenkis 2 Docker
# Installing Docker
apt-get update
apt-get install apt-transport-https ca-certificates
## Install apt-key for docker
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
sudo apt-get update
apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual
@Signorini
Signorini / main.js
Created May 2, 2017 21:43
Setup bootue
import Bootue from './bootue';
Vue.use(Bootue);
import './_core/Core.vue'
import './grid/Grid.vue'
import './grid_bulma/Grid.vue' // my new future grid component
import alert from './alert/Alert.vue'
let components = {
alert
<div class="container">
<div class="columns">
<div class="column">
<alert type="success">
<strong>column</strong>
<p>You successfully read this important alert message.</p>
</alert>
</div>
<div class="column">
<alert type="warning">
@Signorini
Signorini / js
Created November 29, 2017 14:37
Remove duplicate entry - MongoDB
var cursor = db.getCollection('servers').aggregate([
{ $group: {
_id: { name: "$hostname" }, // replace `name` here twice
uniqueIds: { $addToSet: "$_id" },
count: { $sum: 1 }
} },
{ $match: {
count: { $gte: 2 }
} },
{ $sort : { count : -1} },
@Signorini
Signorini / join.js
Created December 16, 2017 01:51
Join mongo db - with lookup
db.applications.aggregate([
{ "$unwind": "$servers" },
{ "$lookup": {
"from": "servers",
"localField": "servers",
"foreignField": "_id",
"as": "servers_details"
}},
// Unwind the result arrays ( likely one or none )
{ "$unwind": "$servers_details" },