Skip to content

Instantly share code, notes, and snippets.

View pokisin's full-sized avatar
💭
programming

Wilmar P pokisin

💭
programming
View GitHub Profile
@pokisin
pokisin / countries.json
Last active May 29, 2021 03:39
Paises en formato json
[
{
"name": "Afghanistan",
"topLevelDomain": [
".af"
],
"alpha2Code": "AF",
"alpha3Code": "AFG",
"callingCodes": [
"93"
@pokisin
pokisin / QasJSON.py
Created March 6, 2019 16:52
Output Django queryset as JSON
def get_json_list(query_set):
list_objects = []
for obj in query_set:
dict_obj = {}
for field in obj._meta.get_fields():
try:
if field.many_to_many:
dict_obj[field.name] = get_json_list(getattr(obj, field.name).all())
continue
dict_obj[field.name] = getattr(obj, field.name)
@pokisin
pokisin / example_yar.php
Created December 4, 2018 16:39
RPC Framework
<?php
// Service for basic operations from server
class Operacion {
/**
* Add two operands
* @param interge
* @return interge
*/
public function add($a, $b) {
@pokisin
pokisin / wil.md
Last active March 7, 2018 18:42
Instalación de Git en un servidor y clonaremos repositorios con accesos ssh.

Ok, antes de comenzar debes conocer un poco sobre los conceptos básicos de git y un poco de comandos de linux, te dejo los siguientes links.

tutorial git comandos linux...

Ahora sí comenzamos

Generando nuestro repositorio en LOCAL

  1. Creamos una carpeta el cual será nuestro repositorio yo la llamaré proyecto1.
  2. Abrimos nuestra consola de git y nos posicionamos dentro de la carpeta creada y ejecutamos los siguientes comandos.
@pokisin
pokisin / pasos.md
Last active August 7, 2017 17:55
Respaldo y restauracion MONGO

Para hacer un Backup

sudo mongodump --db {nombre_de_la base} --out {ruta_donde_se_guardara ejemplo: /var/backups/mongobackups/date +"%m-%d-%y"}

Para restaurar la base

sudo mongorestore --db {nombre_de_la_base_donde_vamosa restaurar} --drop {ruta_donde_se_guardo_el_backup}

@pokisin
pokisin / Install_phalcon.md
Created May 4, 2017 08:42
Instalar Phalcon en LAMP - Manjaro

Bienvenidos hoy vamos a instalar phalcon en Manjaro

  1. Abrimos una terminal y primero clonamos el repositorio
git clone https://aur.archlinux.org/php-phalcon.git
  1. Ingresamos a la carpeta php-phalcon y compilamos el PKGBUILD ejecutamos el siguiente codigo
makepkg -sri
@pokisin
pokisin / instalacion.md
Last active June 29, 2023 21:23
Instalar LAMP en arch linux (Manjaro)

Pasos para instalar LAMP en Manjaro

  1. Abrimos la terminal y ejecutamos la siguiente linea para actualizar la base de datos de los paquetes
  sudo pacman -Syu
  1. Instalamos el apache y ejecutamos lo siguiente
  sudo pacman -S apache
@pokisin
pokisin / install_node.md
Last active March 7, 2018 16:34
Instalar Node js en servidor

Primero instalaremos el curl en el servidor

sudo apt-get install curl

Node V9

curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
sudo apt-get install -y nodejs

Node V8

@pokisin
pokisin / Git.md
Last active May 8, 2017 17:10
Instalar git en server

gl-setup id_rsa.pub

Install Git

Log into your Ubuntu server with your regular user account. We will be installing git from Ubuntu's default repositories:

~$ sudo apt-get install git-core

We now have git installed. We will want to configure a few things for git to operate properly.

@pokisin
pokisin / Uninstall.md
Last active March 20, 2024 20:26
Uninstall git, ubuntu

Uninstall git

To remove just git package itself from Ubuntu 14.04 execute on terminal:

$ sudo apt-get remove git

Uninstall git and it's dependent packages

To remove the git package and any other dependant package which are no longer needed from Ubuntu Trusty.

$ sudo apt-get remove --auto-remove git