Skip to content

Instantly share code, notes, and snippets.

@gbaman
gbaman / HowToOTGFast.md
Last active July 19, 2024 23:49
Simple guide for setting up OTG modes on the Raspberry Pi Zero, the fast way!

Setting up Pi Zero OTG - The quick way (No USB keyboard, mouse, HDMI monitor needed)

More details - http://blog.gbaman.info/?p=791

For this method, alongside your Pi Zero, MicroUSB cable and MicroSD card, only an additional computer is required, which can be running Windows (with Bonjour, iTunes or Quicktime installed), Mac OS or Linux (with Avahi Daemon installed, for example Ubuntu has it built in).
1. Flash Raspbian Jessie full or Raspbian Jessie Lite onto the SD card.
2. Once Raspbian is flashed, open up the boot partition (in Windows Explorer, Finder etc) and add to the bottom of the config.txt file dtoverlay=dwc2 on a new line, then save the file.
3. If using a recent release of Jessie (Dec 2016 onwards), then create a new file simply called ssh in the SD card as well. By default SSH i

// paste in your console
speechSynthesis.onvoiceschanged = function() {
var msg = new SpeechSynthesisUtterance();
msg.voice = this.getVoices().filter(v => v.name == 'Cellos')[0];
msg.text = Object.keys(window).join(' ');
this.speak(msg);
};
@brandondurham
brandondurham / styles.less
Last active June 24, 2024 14:48
Using Operator Mono in Atom
/**
* Using Operator Mono in Atom
*
* 1. Open up Atom Preferences.
* 2. Click the “Open Config Folder” button.
* 3. In the new window’s tree view on the left you should see a file called “styles.less”. Open that up.
* 4. Copy and paste the CSS below into that file. As long as you have Operator Mono SSm installed you should be golden!
* 5. Tweak away.
*
* Theme from the screenshot (http://cdn.typography.com/assets/images/blog/operator_ide2.png):
@vasanthk
vasanthk / System Design.md
Last active July 23, 2024 11:24
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@hjerpbakk
hjerpbakk / BindablePicker.cs
Created July 17, 2014 19:26
A Picker-control for Xamarin.Forms which enables data binding through an ItemsSource and the SelectedItem.
using System;
using Xamarin.Forms;
using System.Collections;
namespace YourNamespace.Views.Controls {
public class BindablePicker : Picker
{
public BindablePicker()
{
this.SelectedIndexChanged += OnSelectedIndexChanged;
@sachin-handiekar
sachin-handiekar / gist:3317727
Created August 10, 2012 20:48
UK Access Point Name (APN) Settings for Mobile Broadband - UK
Note : Dial - *99#
Vodafone
Vodafone has several possible options for Pay As You Go SIM cards. Try each one in turn until the connection works. All use the same username and password.
APN (contract): internet
APN (PAYG): pp.internet
APN (PAYG): ppbundle.internet
APN (PAYG): smart
APN (PAYG): pp.vodafone.co.uk