Skip to content

Instantly share code, notes, and snippets.

View antikytheraton's full-sized avatar
💻
configuring nvim

Aaron Arredondo antikytheraton

💻
configuring nvim
View GitHub Profile
@antikytheraton
antikytheraton / formatted.sh
Created November 5, 2021 20:45 — forked from marcellodesales/formatted.sh
One-liner REST server using netcat - nc
rm -f out
mkfifo out
trap "rm -f out" EXIT
while true
do
cat out | nc -w1 -l 1500 > >( # parse the netcat output, to build the answer redirected to the pipe "out".
export REQUEST=
while read line
do
line=$(echo "$line" | tr -d '[\r\n]')
Install pyenv on Ubuntu 18.04 + fish shell
- Install the packages required to compile Python
$ sudo apt-get update; sudo apt-get install --no-install-recommends make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
- Download pyenv code from github
$ git clone https://github.com/pyenv/pyenv.git ~/.pyenv
- Define environment variable PYENV_ROOT to point to the path where pyenv repo is cloned
$ echo "set --export PYENV_ROOT $HOME/.pyenv" > ~/.config/fish/conf.d/pyenv.fish
@antikytheraton
antikytheraton / markdown-details-collapsible.md
Created April 2, 2020 00:02 — forked from brock/markdown-details-collapsible.md
How to add a collapsible section in markdown.

A collapsible section with markdown

Click to expand!

Heading

  1. A numbered
  2. list
    • With some
    • Sub bullets

I’m using acpi_osi=! acpi_osi='Windows 2009' pcie_port_pm=off on my side

This worked for me too. Thanks to everyone who helped!

For someone who is having simmilar problem here is what I exacly did:

  1. Reinstall Manjaro to make sure everything is clear.
  2. Install packages from octopi: nvidia-utils bumblebee
@antikytheraton
antikytheraton / install virtualenv ubuntu 16.04.md
Created June 12, 2019 22:37 — forked from Geoyi/install virtualenv ubuntu 16.04.md
How to install virtual environment on ubuntu 16.04

How to install virtualenv:

Install pip first

sudo apt-get install python3-pip

Then install virtualenv using pip3

sudo pip3 install virtualenv 
@antikytheraton
antikytheraton / psql-with-gzip-cheatsheet.sh
Created April 23, 2019 21:28 — forked from brock/psql-with-gzip-cheatsheet.sh
Exporting and Importing Postgres Databases using gzip
# This is just a cheat sheet:
# On production
sudo -u postgres pg_dump database | gzip -9 > database.sql.gz
# On local
scp -C production:~/database.sql.gz
dropdb database && createdb database
gunzip < database.sql.gz | psql database
@antikytheraton
antikytheraton / install-docker-master.sh
Created March 5, 2019 17:16 — forked from alexellis/install-docker-master.sh
install docker engine for swarm3k on Ubuntu 16.04. 2 options for installing
#!/bin/sh
# option 2: paste this into user-data to automate install via boot script
# NOTE: update --label=owner=YOURNAME below if you want to easily identify yours
# renames the host to have a suffix of alexellisio
export original=$(cat /etc/hostname)
sudo hostname $original-master-alexellisio
echo $original-master-alexellisio | sudo tee /etc/hostname
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
@antikytheraton
antikytheraton / 4956984-1.py
Created March 5, 2019 00:34 — forked from miku/4956984-1.py
How do you split a csv file into evenly sized chunks in Python?
#!/usr/bin/env python
# import csv
# reader = csv.reader(open('4956984.csv', 'rb'))
def gen_chunks(reader, chunksize=100):
"""
Chunk generator. Take a CSV `reader` and yield
`chunksize` sized slices.
"""
import pandas as pd
import numpy as np
points = [(-0.0249436820467418, 0.464245476374713),]
csv_data = pd.read_csv('./data/PCA_LEU2.csv')
class Diferencia:
def __init__(self, points, data, threshold):
self.threshold = threshold

TODO LIST

Logica para codigos de invitacion

  • Funcionalidad para generar codigos de invitacion - ya esta
  • Una persona puede invitar a varias personas a unirse
  • Por cada seis personas que se haya invitado, se sumaran 365 dias a tu suscripcion
  • Una persona que uso un codigo de invitacion para crear su cuenta, recibe 15 dias a sus suscripcion