Skip to content

Instantly share code, notes, and snippets.

View topogigiovanni's full-sized avatar

Giovanni Mendes Mansueto topogigiovanni

View GitHub Profile
import { buildData } from "./build-data";
<let/data = []/>
<let/selected = null/>
<div class="jumbotron">
<div class="row">
<div class="col-md-6">
<h1>Marko 6 (keyed)</h1>
@topogigiovanni
topogigiovanni / jwt.php
Created May 6, 2022 12:36 — forked from douglascabral/jwt.php
Example of JWT with Pure PHP
<?php
$key = 'your-secret-key-here';
$header = [
'typ' => 'JWT',
'alg' => 'HS256'
];
$header = json_encode($header);
$header = base64_encode($header);
@topogigiovanni
topogigiovanni / Exclude-node_modules.md
Created January 7, 2022 11:04 — forked from anuraghazra/Exclude-node_modules.md
Exclude node_modules folder when copying directory.

Handy Trick To Get Rid Of node_modules

This one is a simple and handy trick when you want to copy your directories without node_modules folder.

Enter this command in your terminal.

robocopy SOURCE DEST /mir /xd node_modules
@topogigiovanni
topogigiovanni / Exclude-node_modules.md
Created January 7, 2022 11:04 — forked from anuraghazra/Exclude-node_modules.md
Exclude node_modules folder when copying directory.

Handy Trick To Get Rid Of node_modules

This one is a simple and handy trick when you want to copy your directories without node_modules folder.

Enter this command in your terminal.

robocopy SOURCE DEST /mir /xd node_modules
@topogigiovanni
topogigiovanni / render-ko.js
Created September 11, 2020 21:44 — forked from kaheglar/render-ko.js
Knockout server-side rendering.
const domino = require('domino');
const html = `
<!DOCTYPE html>
<html>
<body>
<ul data-bind="foreach: list">
<li data-bind="text: $data"></>
</ul>
@topogigiovanni
topogigiovanni / .manifest
Created August 15, 2020 22:28 — forked from devjin0617/.manifest
chrome extension using a content script to access the `window` object
{
"content_scripts": [
{
"matches": ["http://*/*", "https://*/*"],
"js": ["inject.js"],
"all_frames": true
}
],
"web_accessible_resources": [
"content.js"
@topogigiovanni
topogigiovanni / README-Template.md
Created March 22, 2020 23:27 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@topogigiovanni
topogigiovanni / td-agent.Dockerfile
Created February 24, 2020 12:36 — forked from tintoy/td-agent.Dockerfile
Fluentd on Kubernetes for ASP.NET Core logging (via Serilog)
FROM gcr.io/google_containers/fluentd-elasticsearch:1.22
RUN apt-get update && \
apt-get install -y --no-install-recommends make gcc g++ libc6-dev ruby-dev && \
td-agent-gem install fluent-plugin-concat --version '~>1.0.0' --no-ri --no-rdoc && \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false make gcc g++ libc6-dev ruby-dev
# Copy the Fluentd configuration file for concatenating lines in docker logs.
COPY td-agent.conf /etc/td-agent/td-agent.conf
const {
makeRemoteExecutableSchema,
introspectSchema,
mergeSchemas
} = require('graphql-tools');
const { createHttpLink } = require('apollo-link-http');
const { setContext } = require('apollo-link-context');
const { ApolloServer } = require('apollo-server-express');
const fetch = require('node-fetch');
const log4js = require('log4js');
@topogigiovanni
topogigiovanni / youtubeID.js
Created November 24, 2019 17:05 — forked from takien/youtubeID.js
Get YouTube ID from various YouTube URL using JavaScript
/**
* Get YouTube ID from various YouTube URL
* @author: takien
* @url: http://takien.com
* For PHP YouTube parser, go here http://takien.com/864
*/
function YouTubeGetID(url){
var ID = '';
url = url.replace(/(>|<)/gi,'').split(/(vi\/|v=|\/v\/|youtu\.be\/|\/embed\/)/);