Skip to content

Instantly share code, notes, and snippets.

View gabrielqmatos88's full-sized avatar

Gabriel Q. Matos gabrielqmatos88

  • Manaus, Am, Brasil
View GitHub Profile
@gabrielqmatos88
gabrielqmatos88 / AngularJS Provider Test Example
Created March 11, 2016 21:35 — forked from cesarandreu/AngularJS Provider Test Example
Example of how you can test your AngularJS providers.
Look at the README.
@gabrielqmatos88
gabrielqmatos88 / chat_client.pl
Created November 16, 2016 13:34 — forked from chankeypathak/chat_client.pl
Simple chat client in Perl
#!/usr/bin/perl -w
# chat_client.pl
use strict;
use IO::Socket::INET;
my $port = shift or die "No port\n";
my $server = shift or die "No server\n";
my $client_socket = IO::Socket::INET->new(
PeerPort => $port,
PeerAddr => $server,
@gabrielqmatos88
gabrielqmatos88 / chat_server.pl
Created November 16, 2016 13:35 — forked from chankeypathak/chat_server.pl
Simple chat server in perl
#!/usr/bin/perl -w
# chat_server.pl
use strict;
use IO::Socket::INET;
my $port = shift or die "Port required!\n";
my $socket = IO::Socket::INET->new(
LocalPort => $port,
Proto => 'tcp',
Listen => SOMAXCONN
@gabrielqmatos88
gabrielqmatos88 / background.js
Created July 26, 2017 22:39 — forked from danharper/background.js
Bare minimum Chrome extension to inject a JS file into the given page when you click on the browser action icon. The script then inserts a new div into the DOM.
// this is the background code...
// listen for our browerAction to be clicked
chrome.browserAction.onClicked.addListener(function (tab) {
// for the current tab, inject the "inject.js" file & execute it
chrome.tabs.executeScript(tab.ib, {
file: 'inject.js'
});
});
@gabrielqmatos88
gabrielqmatos88 / mongo.bash
Created June 11, 2018 18:04 — forked from iwatakeshi/mongo.bash
Create a Windows service for MongoDB
# Create directories
mkdir c:\mongo\db
mkdir c:\mongo\config
mkdir c:\mongo\log
# Create a configuration file
# in c:\mongo\config\ as
# 'mongod.cfg' and paste:
#|==================================|
#| logpath=C:\mongo\log\mongodb.log |
@gabrielqmatos88
gabrielqmatos88 / kbbgzstyle.css
Created January 23, 2019 22:07
kbbgzstyle.css
a.bugzillaLink {
position: absolute;
top: -24px;
right: 0;
background: #ebebeb;
z-index: 1;
padding: 3px 5px;
}
// ==UserScript==
// @name Mockup vodafone
// @namespace vortek
// @description Load variables
// @include https://vf2.ux-playground.com/gateways/*
// @version 1
// @require https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js
// ==/UserScript==
// a function that loads jQuery and calls a callback function when jQuery has finished loading
function addJQuery(callback) {
@gabrielqmatos88
gabrielqmatos88 / jlanches.json
Created January 30, 2020 14:50
jlanches.json
{
"cardapio": [
{
"tipo": "sanduiche",
"nome": "x-salada",
"valor": 8,
"id": 1
},
{
"tipo": "sanduiche",
@gabrielqmatos88
gabrielqmatos88 / app.component.ts
Created January 30, 2020 17:46
Exemplo requisições - angular 8 usando Promise e Observable
import { Component, OnInit } from '@angular/core';
import { OfertasServices, Oferta } from './ofertas.service';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent implements OnInit {
title = 'exemplo';
@gabrielqmatos88
gabrielqmatos88 / exemplo1.component.ts
Created January 30, 2020 18:12
Angular components communication using service
import { Component, OnInit } from '@angular/core';
import { NotificationService } from './notification.service';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class Exemplo1Component implements OnInit {