Skip to content

Instantly share code, notes, and snippets.

View reyesvicente's full-sized avatar
🏠
Looking for freelance work

Vicente Reyes reyesvicente

🏠
Looking for freelance work
View GitHub Profile
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
cloudd 410 vgreyes 57u IPv6 0x6ffe5572b525f4af 0t0 TCP *:* (CLOSED)
cloudd 410 vgreyes 68u IPv6 0x6ffe5572b525fb8f 0t0 TCP *:* (CLOSED)
cloudd 410 vgreyes 69u IPv4 0x6ffe5572b52f2477 0t0 TCP *:* (CLOSED)
cloudd 410 vgreyes 99u IPv6 0x6ffe5572aa8966cf 0t0 TCP *:* (CLOSED)
cloudd 410 vgreyes 101u IPv6 0x6ffe5572aa89824f 0t0 TCP *:* (CLOSED)
cloudd 410 vgreyes 102u IPv6 0x6ffe5572aa89892f 0t0 TCP *:* (CLOSED)
cloudd 410 vgreyes 103u IPv6 0x6ffe5572aa89900f 0t0 TCP *:* (CLOSED)
cloudd 410 vgreyes 104u IPv6 0x6ffe5572aa8996ef 0t0 TCP *:* (CLOSED)
cloudd 410 vgreyes 105u IPv6 0x6ffe5572aa899dcf 0t0 TCP *:* (CLOSED)
---
title:
published: false
description:
series:
cover_image:
tags:
---
@reyesvicente
reyesvicente / DRF Soft delete mixin
Created June 5, 2021 03:49 — forked from jadhavmanoj/DRF Soft delete mixin
Django Rest Framework (DRF) Soft delete Mixin.
# in DRF DestroyModelMixin delete row. Using Same DELETE method I can soft delete object.
# ex: URL - DELETE https://<hostnam>/api/v1/books/1/
from rest_framework import mixins, permissions, viewsets
from rest_framework.response import Response
from rest_framework import status
class SlSoftDeleteMixin(mixins.DestroyModelMixin):
""" As we are deleting soft"""
@reyesvicente
reyesvicente / Gemfile
Created August 9, 2020 16:13 — forked from dhh/Gemfile
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
@reyesvicente
reyesvicente / django_deploy.md
Last active April 23, 2020 03:32 — forked from bradtraversy/django_deploy.md
Django Deployment - Digital Ocean

Django Deployment to Ubuntu 18.04

In this guide I will go through all the steps to create a VPS, secure it and deploy a Django application. This is a summarized document from this digital ocean doc

Any commands with "$" at the beginning run on your local machine and any "#" run when logged into the server

Create A Digital Ocean Droplet

Use this link and get $10 free. Just select the $5 plan unless this a production app.

@reyesvicente
reyesvicente / meta-tags.md
Created April 8, 2020 17:07 — forked from lancejpollard/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@reyesvicente
reyesvicente / AuthyToOtherAuthenticator.md
Created December 22, 2019 18:03 — forked from gboudreau/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Generating Authy passwords on other authenticators


There is an increasing count of applications which use Authy for two-factor authentication. However many users who aren't using Authy, have their own authenticator setup up already and do not wish to use two applications for generating passwords.

Since I use 1Password for all of my password storing/generating needs, I was looking for a solution to use Authy passwords on that. I couldn't find any completely working solutions, however I stumbled upon a gist by Brian Hartvigsen. His post had a neat code with it to generate QR codes (beware, through Google) for you to use on your favorite authenticator.

His method is to extract the secret keys using Authy's Google Chrome app via Developer Tools. If this was not possible, I guess people would be reverse engineering the Android app or something like that. But when I tried that code, nothing appeared on the screen. My gues

@reyesvicente
reyesvicente / getTotps.js
Created December 22, 2019 18:03 — forked from nmurthy/getTotps.js
export authy totp codes
/* base32 */
/*
Copyright (c) 2011, Chris Umbel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@reyesvicente
reyesvicente / ping.py
Created October 6, 2019 12:15 — forked from ariesmcrae/ping.py
Python3 script that will ping a list of servers in an external file. Output is unreachable_or_timeout.txt, server-not-found.txt, and server-ok.txt
import subprocess
import csv
def ping(hostname):
p = subprocess.Popen('ping ' + hostname, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
pingStatus = 'ok';
for line in p.stdout:
output = line.rstrip().decode('UTF-8')