Skip to content

Instantly share code, notes, and snippets.

View TechplexEngineer's full-sized avatar

Blake Bourque TechplexEngineer

View GitHub Profile
INCLUDE stm32l1xx_constants.s
AREA lab10_DAC, CODE, READONLY
EXPORT __main
IMPORT SIN_LOOKUP
ALIGN
ENTRY
__main FUNCTION

The above code is based on the following resources:

@TechplexEngineer
TechplexEngineer / gist:5951203
Created July 8, 2013 18:24
- [x] @mentions, #refs, [links](), **formatting**, and <del>tags</del> supported - [x] list syntax required (any unordered or ordered list supported) - [x] this is a complete item - [ ] this is an incomplete item
test

IP Addresses are displayed in a human readable format known as Dotted Decimal notation with four octets separated by a dot ie. 192.168.1.1

In the process of trying to have a nice display and one that is sortable in asp.net I devised this solution.

Synposis: The model stores the octets in the database for easy querying form other interfaces. The public accessors can return a stringified form or the IP's Decimal representation.

Using the decimal representation allows for sorting but not noce display. So a bit of work needs to be done in the view to form the IP nicely.

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace PcnWeb.Models
{
public partial class Device
{
public Device()
{
@TechplexEngineer
TechplexEngineer / MVCFlash_changes.md
Last active December 19, 2015 15:19
Adding MVC Flash to asp.net MVC4 projects

just after </runtime> add

<system.web.webPages.razor>
  	<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
		<pages pageBaseType="System.Web.Mvc.WebViewPage">
			<namespaces>
				<add namespace="System.Web.Mvc" />
				<add namespace="System.Web.Mvc.Ajax" />
				<add namespace="System.Web.Mvc.Html" />
				<add namespace="System.Web.Routing" />
@TechplexEngineer
TechplexEngineer / Troubleshooting.md
Last active December 19, 2015 15:59
Deploy with git
  • remote: fatal: this operation must be run in a work tree

    • make sure your GIT_WORK_TREE= is set to a directory that exists and is writeable
  • remote: fatal: You are on a branch yet to be born

    • Gotta tell it what branch to checkout
  • remote: chgrp: changing group of `<file or folder>': Operation not permitted

    • To change the group ownership of a file to another group you have to be a member of that group or root.
    • Is your [git] user a member of the [www-data] group?
Host gh
HostName github.com
User git
Host pt-git
HostName blake.metheus.org
User git
Host pt
HostName blake.metheus.org
User techplex
Host rpi
@TechplexEngineer
TechplexEngineer / workbench.md
Created January 25, 2014 15:23
Fixing MySQL workbench

If you get this error:

(mysql-workbench-bin:13045): Pango-WARNING **: failed to create cairo scaled font, expect ugly output. the offending font is 'Bitstream Vera Sans 9'

(mysql-workbench-bin:13045): Pango-WARNING **: font_face status is: out of memory

(mysql-workbench-bin:13045): Pango-WARNING **: scaled_font status is: out of memory
@TechplexEngineer
TechplexEngineer / howto.md
Last active August 29, 2015 13:57
Clean sticky messes and remove stickers

How to clean sticky messes and remove stickers

  1. Spray the sticky area with WD-40
  2. Carefully use a sharp razor blade to scrape the sticky area.
  • Large stickers may need more WD-40 as you use the razor to peel them off.