Skip to content

Instantly share code, notes, and snippets.

@ruanbekker
ruanbekker / promtail_docker_logs.md
Last active June 13, 2025 04:09
Docker Container Logging using Promtail
@eduavila
eduavila / selinux.md
Last active September 24, 2020 22:19
Liberar porta Selinux Centos7

Liberar porta SELinux

Status do SELinux

getenforce

Lista porta liberada

sudo semanage port -l | grep http_port_t

Libera porta no selinux

@edvinasbartkus
edvinasbartkus / .github-workflows-main.yml
Created November 16, 2019 10:06
Github Action for React Native Detox
name: Detox
on: [push]
jobs:
build:
runs-on: macOS-latest
timeout-minutes: 15
env:
@stuartaccent
stuartaccent / file-uploader.component.html
Last active March 18, 2021 16:24
Angular 7 file uploader with queue and progress using HttpClient, example https://stackblitz.com/edit/angular-7-file-upload-queue
<div class="row">
<div class="col-md-3">
<h3>Select files</h3>
<input type="file" #fileInput multiple (change)="addToQueue()" />
</div>
<div class="col-md-9">
<h3>Upload queue</h3>
<table class="table-headed table-striped">
@davidcostadev
davidcostadev / promises.js
Created July 1, 2017 19:14
Estruturando promises
function calcular() {
return new Promise((resolve, reject) => {
console.log('inicio...')
resolve()
})
}
function um() {
@sheharyarn
sheharyarn / request.js
Last active August 24, 2023 14:55
Axios Request Wrapper for React (https://to.shyr.io/axios-requests)
/**
* Axios Request Wrapper
* ---------------------
*
* @author Sheharyar Naseer (@sheharyarn)
* @license MIT
*
*/
import axios from 'axios'
@pgilad
pgilad / getSubdomain.js
Last active October 10, 2018 11:55
Regex for matching subdomains in document.location.hostname
var getSubdomain = function (baseDomain) {
if (!baseDomain) {
return null;
}
var regSub = new RegExp('^((?!' + baseDomain + '|www)([^.]*))', 'g');
var _subdomain = document.location.hostname.match(regSub);
if (_subdomain && _subdomain[0]) {
return _subdomain[0];
} else {
@ChrisMcKee
ChrisMcKee / Repository.cs
Created January 4, 2013 11:41
Generic Repository Interface and implementation. NHIBERNATE
namespace Core.Repository
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
public interface IRepository<T> where T : class
{
bool Add(T entity);