Skip to content

Instantly share code, notes, and snippets.

View neomadara's full-sized avatar
🏠
Working from home

Cristian Gutiérrez neomadara

🏠
Working from home
View GitHub Profile
@neomadara
neomadara / init.vim
Created February 24, 2021 02:13 — forked from benawad/init.vim
" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'scrooloose/nerdtree'
"Plug 'tsony-tsonev/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'
http://cronus.allowed.org works for me, 2018.1.6
#!/usr/bin/env python3
import subprocess
from selenium import webdriver
some_site = 'http://www.google.com'
chromedriver_path = '/usr/lib/chromium-browser/chromedriver'
# Block until Chromium finishes launching and self-terminates
subprocess.run(['chromium-browser', '--headless', '--disable-gpu', '--dump-dom', 'about:blank'])
@neomadara
neomadara / digital_ocean_setup.md
Created August 1, 2018 12:25 — forked from ChuckJHardy/digital_ocean_setup.md
DigitalOcean Ubuntu 14.04 x64 + Rails 4 + Nginx + Unicorn + PostgreSQL + Capistrano 3 Setup Instructions

DigitalOcean Ubuntu 14.04 x64 + Rails 4 + Nginx + Unicorn + PostgreSQL + Capistrano 3

SSH into Root

$ ssh root@123.123.123.123

Change Root Password

@neomadara
neomadara / .zshrc
Created July 29, 2018 20:26 — forked from masnun/.zshrc
Zsh configuration
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="custom"
# Example aliases
@neomadara
neomadara / sss.py
Created June 22, 2018 00:55 — forked from eaorak/sss.py
Python - Screen Saver "Saver" Script
#!/usr/bin/python
# This script prevents screen saver get activated by moving mouse periodically.
# EAO-09.2012
import win32api, time
print "Die screensaver !"
dif=1
exc=False
while True:
try:
@neomadara
neomadara / sss.py
Created June 22, 2018 00:55 — forked from eaorak/sss.py
Python - Screen Saver "Saver" Script
#!/usr/bin/python
# This script prevents screen saver get activated by moving mouse periodically.
# EAO-09.2012
import win32api, time
print "Die screensaver !"
dif=1
exc=False
while True:
try:
@neomadara
neomadara / Gemfile
Created April 20, 2018 11:50 — forked from goncalvesjoao/Gemfile
Changes you need to make in order to make Devise use JWT Header Authentication
# Add the "https://github.com/jwt/ruby-jwt" gem to your "Gemfile"
gem 'jwt'
@neomadara
neomadara / MongoDB_macOS_Sierra.md
Created October 28, 2017 17:09 — forked from nrollr/MongoDB_macOS_Sierra.md
Install MongoDB on Sierra using Homebrew

##Install MongoDB on macOS Sierra

This procedure explains how to install MongoDB using Homebrew on macOS Sierra 10.12.
Official MongoDB install documentation: here

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@neomadara
neomadara / gist:ee4533fd4335711d0ea289b84017a6af
Last active July 13, 2021 23:42
Guillotine cutting algorithm
$paginador = 6;
$contador_interno = 1;
$total_tickets = 18;
$cada = ceil($total_tickets/$paginador);
$total_pagina = $cada * 5;
for($contador = 1; $contador<=$cada; $contador++){
for($contador_interno = $contador; $contador_interno<=$total_pagina+$contador; $contador_interno += $cada){
if($contador_interno<=$total_tickets){
echo $contador_interno.' ';