Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

cesco cescoferraro

Block or report user

Report or block cescoferraro

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View main.go
package main
import (
"encoding/json"
"html"
"io/ioutil"
"log"
"net/http"
"net/url"
"regexp"
View gist:f827c51c068a30a62b520b76010ebf35
const pingEpic = (action$) => action$
.pipe(
filter((action: IAction) => action.type === 'PING'),
mergeMap((action: IAction) =>
ajax({
method: "GET",
url: apiURL() + "/party/" + action.payload
})
.pipe(
mergeMap((data) => {
View json vouchers dani
2018/05/09 21:35:58 Request received from body
2018/05/09 21:35:58 [
{
"id": "5ae9cc30cc922d08eab5d47d",
"creationDate": 1525271600000,
"updateDate": -62135596800000,
"startDate": 1532988120000,
"endDate": 1533074520000,
"customerId": "5849ebe9cc922d4efdbf00e4",
"partyId": "5adfaa31cc922d5c7853f988",
View worker.form.tsx
const TestaCPFFunction = (strCPF) => {
let Soma;
let Resto;
Soma = 0;
if (strCPF == "00000000000") {
return false
}
for (let i = 1; i <= 9; i++) {
Soma = Soma + parseInt(strCPF.substring(i - 1, i)) * (11 - i);
View gist:a40dc2924e71b28d26d03e103565c3c3
package image
import (
"io"
"os"
"strings"
"archive/tar"
"bytes"
"io/ioutil"
View Dockerfile
FROM alpine:3.4
RUN apk add --no-cache ca-certificates apache2-utils
ADD ./dist/bin/goapp /bin/goapp
CMD ["/bin/goapp"]
@cescoferraro
cescoferraro / deploy_docker.go
Created Oct 23, 2016
docker & kubernetes client example golang
View deploy_docker.go
package cmd
import (
"bitbucket.org/cescoferraro/api/util"
"github.com/fatih/color"
"github.com/spf13/cobra"
)
var (
logger = util.Block{
@cescoferraro
cescoferraro / Dockerfile.dev
Created Oct 11, 2016
GLIDE INSTALL DOCKERFILE
View Dockerfile.dev
# GLIDE INSTALLATION
#WORKDIR /tmp
# RUN curl -sL https://github.com/Masterminds/glide/releases/download/v0.12.3/glide-v0.12.3-linux-amd64.tar.gz | tar xvz
# RUN chmod +x /tmp/linux-amd64/glide
# RUN mv /tmp/linux-amd64/glide /usr/local/bin/glide
# RUN chmod +x /usr/local/bin/glide
# RUN glide install
View kubelet wrapper
[Unit]
Description=Kubernetes Kubelet
After=docker.service
Requires=docker.service
[Service]
User=root
EnvironmentFile=/home/core/environment
Environment=KUBELET_VERSION=v1.3.6_coreos.0
Environment="RKT_OPTS=--volume=kubeconfig,kind=host,source=/home/core/.kube/config \
View Dockerfile
FROM ubuntu:14.04
MAINTAINER Francesco Ferraro <francescoaferraro@gmail.com>
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y software-properties-common
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y curl
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash -
RUN DEBIAN_FRONTEND=noninteractive add-apt-repository ppa:masterminds/glide
RUN DEBIAN_FRONTEND=noninteractive add-apt-repository ppa:ubuntu-lxc/lxd-stable
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y git
You can’t perform that action at this time.