Skip to content

Instantly share code, notes, and snippets.

View paridin's full-sized avatar
🎯
Focusing

Roberto Estrada paridin

🎯
Focusing
View GitHub Profile
@paridin
paridin / recover_postico.zsh
Created October 29, 2022 22:56
A function helper to recover your postico configurations from git
function restore_postico_config() {
yn=""
origin=YOUR_GIT_PATH
recovery_path=$HOME/Library/Containers/at.eggerapps.Postico/Data/Library/Application\ Support/Postico
if ! git clone "${origin}" "${recovery_path}" 2>/dev/null && [ -d "${recovery_path}" ]; then
echo "Clone failed because the folder ${recovery_path} exists"
while true; do
FROM bitwalker/alpine-elixir-phoenix:1.12.2 AS builder
ARG COOKIE
# The environment to build with
ARG MIX_ENV=prod
# Set this to true if this release is not a Phoenix app
ARG SKIP_PHOENIX=false
# If you are using an umbrella project, you can change this
# argument to the directory the Phoenix app is in so that the assets
# can be built
@paridin
paridin / ex_pixel.ex
Last active June 23, 2020 20:23
an example of create an pixel event using elixir
defmodule Fb.Pixel do
@moduledoc """
Facebook Pixel
requires HTTPPoison, Jason
"""
@pixel_id Application.get_env(:fb, :pixel_id)
@api_version Application.get_env(:fb, :fb_graph_api_version)
def create_events(token, events, test_event \\ nil) do
@paridin
paridin / elixir.json
Last active June 14, 2020 19:20
VSCode Elixir Snippets
{
// Place your snippets for elixir here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",
@paridin
paridin / pasos_elixir_install_ubuntu_18.04.md
Last active August 1, 2019 15:10
Guia rápida para instalar elixir con ubuntu 18.04 (docker para postgres)

ubuntu dependencias

sudo apt install \
git build-essential autoconf m4 libncurses5-dev libwxgtk3.0-dev libgl1-mesa-dev libglu1-mesa-dev libpng-dev libssh-dev unixodbc-dev xsltproc fop libxml2-utils \
automake autoconf libreadline-dev \
libncurses-dev libssl-dev libyaml-dev \
libxslt-dev libffi-dev libtool unixodbc-dev \
unzip curl vim inotify-tools
@paridin
paridin / nginx.daemon
Last active April 18, 2019 02:40
nginx daemon
#!/bin/sh
#
# nginx - this script starts and stops the nginx daemon
#
# chkconfig: - 85 15
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \
# proxy and IMAP/POP3 proxy server
# processname: nginx
# config: /etc/nginx/nginx.conf
# config: /etc/sysconfig/nginx
@paridin
paridin / restrada.md
Last active January 30, 2024 02:48
Resume |> CV

Roberto Estrada Alcázar dev@paridin.com, CV, GitHub, Stack Overflow, LinkedIn

EDUCATION Universidad Politecnica del Estado de Morelos, Jiutepec, Morelos, MX

EXPERIENCE AS DEVELOPER I worked in different projects with Python, JavaScript and last five years with Elixir. Also, I'm fluent using Unix/Linux/OSX.

Entrepreneur Developer MX DF. Jan 2021 - Current

As an entrepreneur, I've built a successful business behind my trademark, defdo. While continuing to work as a software developer, I've also taken on several side projects to develop a framework for simplifying custom layouts and improving our OTP experience.

@paridin
paridin / rename-component.md
Last active August 14, 2017 15:28
Ember rename component, shell helper

Rename a component file.

I made a mistake to naming some components, I don't want to erase it and create again, the problem is, I need to rename the files by hand, it's a boring task, and maybe in the future I will get the same issue, to make me the life easier I developed the following snippet, you should use it if you have the same problem.

The snippet

#!/usr/bin/env bash
# purpose: rename files, in same path
@paridin
paridin / vimrc.light.md
Last active February 16, 2017 16:41
An light configuration of vim. Great for work in a remote servers.

This version of .vimrc is lightweight and powerful to work in a remote environment as private servers without access to the internet.

Requirements

  • Vundle (git is required)
  • vim-airline (With themes)
  • ctrlp

You must download the projects from their github accounts.

vim-plug

@paridin
paridin / tmux-snippet.md
Last active September 21, 2016 15:33
If you want your tmux was keep on auto start, this snippet is your solution.

How it works

Validate if tmux exists and send the buffer to an empty stream /dev/null -> which tmux 2>&1 >/dev/null If session hack exists it recover it -> tmux attach -t hack Otherwise, It create a new session call hack -> tmux new -s hack

if which tmux 2>&1 >/dev/null; then
  if [ $TERM != "screen-256color" ] && [  $TERM != "screen" ]; then
    tmux attach -t hack || tmux new -s hack; exit
  fi
fi