Skip to content

Instantly share code, notes, and snippets.

@uogbuji
uogbuji / pixelbook-dev-setup.md
Last active July 10, 2023 14:53 — forked from cassiozen/pixelbook-dev-setup.md
Notes on setting up Pixelbook for development

Pixelbook or Pixel Slate Setup

Partly updated June 2023

General caution: Chrome OS is a secure OS by design, but this has at least one key consequence. If you change your Google account password, you will still be required to enter the old password the next time you access each Chrome OS device. Devices are encrypted with that password, so the OS needs to decrypt using the old password then re-encrypt using the new one. If you forget your old password you will lose access to your Chrome OS device data. As always, make sure you keep backups up to date.

Fast User Switching

If you have multiple Chrome OS accounts (Say, work and play), you can quickly sitch between them without logging out:

@markbao
markbao / howto.md
Last active July 26, 2021 00:40
Matias Ergo Pro Mac keyboard: remap right-control (where "b" should be) to "b"

The Matias Ergo Pro keyboard has a control key where I usually type "b" (I type "b" with my right hand). Here's how to remap that key to a "b".

  1. Download Karabiner: https://pqrs.org/osx/karabiner/
  2. Install it
  3. Open the app and go to "Misc & Uninstall"
  4. Click "Open private.xml" to open the customization file
  5. Open "private.xml" in TextEdit
  6. Add the following:
  7. Save and go back to Karabiner
  8. Go back to the first tab, Change Key
@jed
jed / how-to-set-up-stress-free-ssl-on-os-x.md
Last active February 25, 2024 17:35
How to set up stress-free SSL on an OS X development machine

How to set up stress-free SSL on an OS X development machine

One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.

Most workflows make the following compromises:

  • Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.

  • Use production SSL certificates locally. This is annoying

import theano
from pylearn2.models import mlp
from pylearn2.training_algorithms import sgd
from pylearn2.termination_criteria import EpochCounter
from pylearn2.datasets.dense_design_matrix import DenseDesignMatrix
import numpy as np
from random import randint
class XOR(DenseDesignMatrix):