Skip to content

Instantly share code, notes, and snippets.

@mleinart
mleinart / sierra_mc7355_flashing.md
Last active August 3, 2023 03:59
Flashing Carrier configuration and updated firmware to a Sierra MC7355

Overview

The Sierra MC7355 can run configurations for several North American carriers. These cards are easy to find on eBay and notable for their support for the Sprint LTE network. Unless you're luck out, you may find you need to flash a new carrier configuration onto the card you purchased before using it.

Notes

These procedures are specific to the setup I had to perform this on. Most notably, the only system I had with a mini-PCI-e slot was the target pfSense system, a PCengines APU1d with no VGA port (serial console only). If you're able to obtain a

@mleinart
mleinart / whisper-path-migrate.sh
Created April 25, 2012 08:15
Script to migrate Graphite Whisper data from one dir to another
#!/bin/bash
## Adjustments
PATH=/bin:/usr/bin:/sbin:/usr/sbin
CARBON_SCRIPT=/etc/init.d/carbon-cache
CARBON_CONF=/etc/carbon/carbon.conf
RSYNC_OPTIONS='-av --ignore-existing'
WHISPER_BIN=/usr/bin
execute_cutover () {
@mleinart
mleinart / sourdough_intro.md
Last active April 25, 2020 02:39
Getting Started with Sourdough

A Recipe Introduction to Sourdough Bread

This is a recipe for a relatively simple sourdough sandwich bread. My motivation is to provide a recipe that reduces as much as possible the number of tricky techniques. For this reason, we'll use a recipe that bakes in a standard 4x8" bread tin (to mitigate any mistakes in shaping) and we'll do a traditional knead of the dough with a stand mixer rather than a hand knead or any alternate gluten development strategies. Still, there are plenty of steps that require a judgement call. Be patient (good bread takes time) and don't stress too much. Pay close attention to what the dough looks and feels like at each step each time you bake. As you bake more bread, you'll begin to notice those subtle, hard-to-describe cues that tell you when youre ready for the next step.

Notes before starting

A few quick notes for context before starting:

Baker's percentages:

You'll find a lot of bread recipes give just a bunch of percentages for the ingredients. What it is is the r

@mleinart
mleinart / GobiNet-linux_3_19.diff
Last active March 13, 2020 21:49
Patch to GobiNet driver to support linux kernel >= 3.19
This is a patch to the GobiNet driver provided by Netgear
(http://www.downloads.netgear.com/files/aircard/Linux-Support-S2.13N2.25.zip) to support Kernel versions 3.19 and up
which deprecated the struct file->f_dentry api (https://lwn.net/Articles/206758/) as well as to support kernel versions 4.7
and above which removed struct net_device->trans_start
You need this patch if you see either of these errors while compiling:
/usr/src/GobiNet/GobiUSBNet.c: In function ‘GobiUSBNetStartXmit’:
/usr/src/GobiNet/GobiUSBNet.c:1201:8: error: ‘struct net_device’ has no member named ‘trans_start’; did you mean ‘mem_start’?
pNet->trans_start = jiffies;
@mleinart
mleinart / Sierra-QMIDrivers-fix_compile_errors.diff
Last active March 13, 2020 21:48
Fixes to Sierra Wireless QMI drivers to allow compiles on new versions of Linux
This is a patch to the Linux QMI drivers provided by Sierra Wireless
(http://source.sierrawireless.com/resources/airprime/software/usb-drivers-linux-qmi-software-s2,-d-,25n2,-d-,38/).
These drivers incorrectly assign `usb_serial_generic_resume` to a `struct usb_driver.resume` when it can only be assigned
to a `struct usb_serial_driver` (and the driver already provides one). Instead, the `struct usb_driver.resume` should get
`usb_serial_resume` from the generic usb-serial driver which does the delegation to the function passed into the
`struct usb_serial_driver.resume`. The `struct usb_driver.reset_resume` is removed as that's added automatically by the
kernel's USB init code.
Use this patch if you get the following errors compiling:

Madeleines

Yield

Makes two to three dozen madeleines, depending on how much the well is filled

Ingredients##

  • 1.5 tsp baking powder
  • 1 1/3 cup white flour (optimally: white pastry flour)
  • 1/2 tsp salt
  • 4 eggs, room temperature
  • 2/3 cup white sugar
@mleinart
mleinart / cabbage_soup.md
Created February 6, 2018 19:25
Cabbage vegetable soup recipe

Cabbage Soup

Yield

Makes 2 1/2 to 3 quarts soup

Ingredients

  • 3 tbsp butter or oil of choice (e.g. coconut)
  • large sweet or yellow onion
  • 1-2 leeks (optional)
  • 2 tbsp tomato paste
  • 1 tbsp fermented chili paste (optional)
#!/usr/bin/env python
"""Launchpad to github bug migration script.
There's a ton of code from Hydrazine copied here:
https://launchpad.net/hydrazine
WARNING: this code was written for the Github issues v2 API, and has *not* been ported to v3. If anyone finds it useful and ports it, please drop me a pull request.
Usage
-----
@mleinart
mleinart / graphTemplates.conf
Created September 22, 2011 17:25
Solarized graph template for Graphite
[solarized-dark]
background = #002b36
foreground = #839496
majorLine = #fdf6e3
minorLine = #eee8d5
lineColors = #268bd2,#859900,#dc322f,#d33682,#db4b16,#b58900,#2aa198,#6c71c4
fontName = Sans
fontSize = 10
fontBold = False
fontItalic = False
@mleinart
mleinart / broccoli_cheddar_soup
Last active November 5, 2016 05:04
Vegetarian Broccoli Cheddar Soup
Ingredients:
2tbsp + 1.5oz (~3tbsp) butter
1.5oz (~1/3 cup) flour
2 medium shallots [1]
6 cups vegetable stock [2]
1 cup milk
8oz heavy cream
8oz yellow cheddar, shredded [3]
2 heads of Broccoli, chopped and tough skin removed from the stalk
1 large carrot cut into matchsticks