Skip to content

Instantly share code, notes, and snippets.

View devfelipereis's full-sized avatar

Felipe Gonçalves dos Reis devfelipereis

View GitHub Profile
@devfelipereis
devfelipereis / laravel_nginx.md
Created September 12, 2016 17:04 — forked from folivares/laravel_nginx.md
Nginx configuration for Laravel 5.1

Nginx Server Blocks configuration to run more than one Laravel 5.1 web-app off of a single Linux server

Prerequisites

  • PHP package: php5-fpm php5-mcrypt php5-mysql
  • Laravel 5.1
  • Nginx 1.8

Default Server Block

import React from "react";
import { render } from "react-dom";
const ParentComponent = React.createClass({
getDefaultProps: function() {
console.log("ParentComponent - getDefaultProps");
},
getInitialState: function() {
console.log("ParentComponent - getInitialState");
return { text: "" };
@devfelipereis
devfelipereis / introrx.md
Created April 4, 2017 00:12 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@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.

@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 / .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 / .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:
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
labels:
name: logspout
name: logspout
namespace: default
spec:
selector:
matchLabels:
@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
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();