Skip to content

Instantly share code, notes, and snippets.

View pedroresende's full-sized avatar

Pedro Resende pedroresende

View GitHub Profile
@pedroresende
pedroresende / 0 Linux-On-MBP-Late-2016.md
Created December 18, 2024 11:16 — forked from roadrunner2/0 Linux-On-MBP-Late-2016.md
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

@pedroresende
pedroresende / ubuntu-22.04-mbp-a1707.md
Created October 16, 2024 10:20 — forked from rob-hills/ubuntu-22.04-mbp-a1707.md
Ubuntu 22.04 on MacBook Pro 2017 (A1707, MBP 14,3)

Summary

Random set of notes and links that have helped me in the saga to get Ubuntu 22.04 up and running on my 2017 MacBook Pro These notes are mainly for myself in the event that I have to do this again some day. But if you find them helpful, that's great.

Important update

Unfortunately the MacBookPro that I bought second hand turned out to be a dud with some serious hardware flaws that didn't show up until a couple of months after I'd bought it.

I've since purhcased another laptop so I'm not going to be able to maintain this GIST.

I'll leave it here for now in case others want to contribute updates, or clone it. If you feel it's out of date or misleading or a waste of time, let me know in the comments and I'll remove it.

### Keybase proof
I hereby claim:
* I am pedroresende on github.
* I am pedroresende (https://keybase.io/pedroresende) on keybase.
* I have a public key ASBFtQIqhM5b5tcMY2nC0gshB3ubRXgUlGF1UZm9GVmFcwo
To claim this, I am signing this object:
<?php
$time_start = microtime(true);
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "http://api.fix_trailing_old_variables.kinternal.kwankodev.net/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
<?php
// src/Controller/HomeController.php
namespace App\Controller;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use App\Service\ConfigGenerator;
use App\Service\StoreFactory;
class HomeController
@pedroresende
pedroresende / PreCommitHook.php
Created February 2, 2018 10:55 — forked from joaoinacio/PreCommitHook.php
php QC pre-commit hook
#!/usr/bin/php
<?php
/**
* Git pre-commit hook for PHP code quality
* install with `<path-to-file> install`
*/
class PreCommitHook
{
/**
public function setUserVariables($I)
{
if ($I->amIAdmin($I)) {
$URL = '/admin_herbals';
$saveButton_id = '#btupdate';
} else {
$URL = '/herbals';
$saveButton_id = '#submit';
}
}
var ProjectList = React.createClass({
render: function() {
return (
<option value={this.props.data.projectId}>
{this.props.data.projectName}
</option>
);
}
});
// these are labels for the days of the week
var cal_days_labels = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
// these are human-readable month name labels, in order
var cal_months_labels = ['January', 'February', 'March', 'April',
'May', 'June', 'July', 'August', 'September',
'October', 'November', 'December'];
// these are the days of the week for each month, in order
var cal_days_in_month = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
var Content = React.createClass({
render: function() {
var view = "/projects/view/" + this.props.content.id;
var edit = "/projects/edit/" + this.props.content.id;
var remove = "/projects/delete/" + this.props.content.id;
return (
<tr role="row" className="even">
<td className="sorting_1"><a href={ edit }>{ this.props.content.id }</a></td>
<td>{this.props.content.client}</td>
<td>{this.props.content.name}</td>