Skip to content

Instantly share code, notes, and snippets.

View bubuntux's full-sized avatar

Julio Gutierrez bubuntux

View GitHub Profile
@roadrunner2
roadrunner2 / 0 Linux-On-MBP-Late-2016.md
Last active February 29, 2024 16:29
Linux on MacBook Pro Late 2016 and Mid 2017 (with Touchbar)

Introduction

This is about documenting getting Linux running on the late 2016 and mid 2017 MPB's; the focus is mostly on the MacBookPro13,3 and MacBookPro14,3 (15inch models), but I try to make it relevant and provide information for MacBookPro13,1, MacBookPro13,2, MacBookPro14,1, and MacBookPro14,2 (13inch models) too. I'm currently using Fedora 27, but most the things should be valid for other recent distros even if the details differ. The kernel version is 4.14.x (after latest update).

The state of linux on the MBP (with particular focus on MacBookPro13,2) is also being tracked on https://github.com/Dunedan/mbp-2016-linux . And for Ubuntu users there are a couple tutorials (here and here) focused on that distro and the MacBook.

Note: For those who have followed these instructions ealier, and in particular for those who have had problems with the custom DSDT, modifying the DSDT is not necessary anymore - se

@JannethAmaya
JannethAmaya / gist:a2b2283cac1d3855f044dad69ebaff90
Last active December 17, 2016 14:47
El problema de las N reinas
El problema de las N reinas consiste en situar N reinas en un tablero de ajedrez de N x N sin que se amenacen entre ellas.
*Cosas por considerar:
-Una reina amenaza a otra si esta en la misma fila, la misma columna o en la misma diagonal.
-Solamente N=2 y N=3 no tienen soluciones.
El programa debe aceptar como entrada el valor de N, y debe regresar el numero de soluciones posibles y las soluciones representadas del alguna manera (una matriz con 1’s representando a las reinas, un vector con las posiciones de las reinas,
o cualquier forma que quieras elegir y sea eficiente)
Para probar el numero de soluciones validas aquí esta el resultado esperado para los primeros 10 tamaños:
@fhernandezn
fhernandezn / pegman.md
Last active November 14, 2016 03:39
Pegman

Problem

While using Google Street View, you may have picked up and dropped the character Pegman before. Today, a mischievous user is going to place Pegman in some cell of a rectangular grid of unit cells with R rows and C columns. Each of the cells in this grid might be blank, or it might be labeled with an arrow pointing in one of four possible directions: up, right, down, or left.

When Pegman is placed on a grid cell, if that cell is blank, Pegman stands still forever. However, if that cell has an arrow, Pegman starts to walk in that direction. As he walks, whenever he encounters a blank cell, he just keeps walking in his current direction, but