Skip to content

Instantly share code, notes, and snippets.

View CapnKernel's full-sized avatar

Mitch Davis CapnKernel

  • Melbourne, Australia
View GitHub Profile
-------------------------------- LCD.kicad_sch --------------------------------
index c367af7..846e2d4 100644
@@ -510,22 +510,22 @@
(property "Place" "" (id 7) (at 165.735 118.11 0)
(effects (font (size 1.27 1.27)) hide)
)
- (pin "1" (uuid 225facb2-9147-4f44-9e7a-a1c58c601ea3))
- (pin "1" (uuid 225facb2-9147-4f44-9e7a-a1c58c601ea3))
- (pin "2" (uuid 04c6ad24-e3cc-4e1a-9ed7-acc98f1449fc))
- (pin "2" (uuid 04c6ad24-e3cc-4e1a-9ed7-acc98f1449fc))
#! /bin/gawk -f
BEGIN {
NOZZLE="S0";
BED="S0";
SKIP=0;
LN=0;
INCLUDE=0;
LASTZ="";
}
@@ -551,20 +549,14 @@
for p in self.libparts:
s.update( p.getFieldNames() )
- # omit anything matching any regex in excluded_fields
- ret = set()
- for field in s:
- exclude = False
- for rex in excluded_fields:
- if re.match( rex, field ):
mjd@xiaomao ~]$ gdb kicad
GNU gdb (GDB) Fedora 8.3.50.20190824-30.fc31
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
@CapnKernel
CapnKernel / motor.ino
Created November 25, 2019 00:59
Changes @beholder77 made for IBT_2
--- motor.ino 2019-11-25 11:57:31.874180846 +1100
+++ motor-ibt2.ino 2019-11-25 11:53:44.063533486 +1100
@@ -102,9 +102,9 @@
gnd gnd
*/
-//#define VNH2SP30 // defined if this board is used
-//#define DISABLE_TEMP_SENSE // if no temp sensors avoid errors
-//#define DISABLE_VOLTAGE_SENSE // if no voltage sense
+#define VNH2SP30 // defined if this board is used
@CapnKernel
CapnKernel / result.txt
Last active August 13, 2019 10:28
Baidu translation
Content-Type: text/html; charset=utf-8
{'from': 'en', 'to': 'zh', 'trans_result': [{'src': 'I love you & you love me!!!', 'dst': '我爱你,你爱我!!!!'}]}
import requests
from lxml import html, etree
def get_shipment(item):
"Find the courier waybill number for this item"
print ">>>in get_shipment"
print ">>>item=", item
supplier_code = item.product.supplier_code
@CapnKernel
CapnKernel / groups|__init__.py
Created August 4, 2016 14:17
Groups for Django
from .require_group import group_required
# Is also used to change details of an order, if needed.
class NewOrChangeOrderForm(forms.Form):
customer = forms.ModelChoiceField(queryset=Customer.objects.order_by('id'), empty_label='<choose>')
# ...
def __init__(self, *args, **kwargs):
super(NewOrChangeOrderForm, self).__init__(*args, **kwargs)
# Customise how we show customer name
self.fields['customer'].label_from_instance = lambda obj: "%s (%s %s)" % (obj.name, obj.firstname, obj.lastname) if obj.nick else "%s %s" % (obj.firstname, obj.lastname)
{% get_current_language as LANGUAGE_CODE %}
<div id="lang_section" class="float-right">
<form action="{% url 'set_language' %}" method="post" id="base-lang-form">
{% csrf_token %}
<select name="language" id="base-lang-selector">
{% for lang in LANGUAGES %}
<option value="{{ lang.0 }}"{% if lang.0 == LANGUAGE_CODE %} selected{% endif %}>{% trans lang.1 %}</option>
{% endfor %}
</select>
</form>