Skip to content

Instantly share code, notes, and snippets.

View devfelipereis's full-sized avatar
📚
Larning KMP, Jetpack Compose and SwiftUI

Felipe Gonçalves dos Reis devfelipereis

📚
Larning KMP, Jetpack Compose and SwiftUI
View GitHub Profile
@devfelipereis
devfelipereis / estados-cidades.json
Created May 6, 2021 14:59 — forked from letanure/estados-cidades.json
JSON estados cidades do brasil, dividido por estados. segunda lista atualizada em 2020, dados do IBGE
{
"estados": [
{
"sigla": "AC",
"nome": "Acre",
"cidades": [
"Acrelândia",
"Assis Brasil",
"Brasiléia",
"Bujari",
<?php
namespace App\Services;
use File;
use Nesk\Puphpeteer\Puppeteer;
class PDFService
{
public function generateFromURL(String $url, String $fileName, String $savePath = ''): void
@devfelipereis
devfelipereis / php-pools.md
Created March 27, 2020 17:01 — forked from holmberd/php-pools.md
Adjusting child processes for PHP-FPM (Nginx)

Adjusting child processes for PHP-FPM (Nginx)

When setting these options consider the following:

  • How long is your average request?
  • What is the maximum number of simultaneous visitors the site(s) get?
  • How much memory on average does each child process consume?

Determine if the max_children limit has been reached.

  • sudo grep max_children /var/log/php?.?-fpm.log.1 /var/log/php?.?-fpm.log
void main() {
runApp(_SwitchingThemeApp());
}
/// Properties that help me keep track of the example being run.
bool _useMaterial = false;
class _SwitchingThemeApp extends StatefulWidget {
@override
_SwitchingThemeAppState createState() => _SwitchingThemeAppState();
@devfelipereis
devfelipereis / nginx.conf
Created June 24, 2019 11:26 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
labels:
name: logspout
name: logspout
namespace: default
spec:
selector:
matchLabels:
@devfelipereis
devfelipereis / .gitlab-ci.yml
Last active October 18, 2018 14:05
gitlab ci deploy rancher k8s example (annotations) [NOT RECOMMED - CAN NOT ROLLBACK]
image: docker:latest
services:
- docker:dind
stages:
- build
- deploy
variables:
@devfelipereis
devfelipereis / .gitlab-ci.yml
Last active October 25, 2018 14:08
gitlab ci deploy rancher k8s example (commit sha)
image: docker:latest
services:
- docker:dind
stages:
- build
- deploy
variables:
@devfelipereis
devfelipereis / .hyper.js
Created March 10, 2018 16:10
my hyper.js configs
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// Choose either "stable" for receiving highly polished,
// or "canary" for less polished but more frequent updates
updateChannel: 'stable',
@devfelipereis
devfelipereis / README.md
Last active June 28, 2023 16:56 — forked from bvis/README.md
Docker Env Vars expanded with secrets content

Set secrets as env variables in docker

This script will read your secret file and set each line as an env variable in your container.

How to use it

I' assuming that you already has a entrypoint file in your Dockerfile. So now, you need to copy and paste the contents of set_env_secrets.sh to your entrypoint(you don't need the first line).

Now, you need to create a secret, the name could be whatever you like. I'm using the name of my application as a pattern for my secrets name. For this example, my secret name will be super-project and the content will be.