This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uint8_t watchdog_count = 0; | |
ISR(WDT_vect) { | |
// This vector is for the watchdog timer | |
PORTA = PORTA | (1 << LED ); // The LED never goes on | |
++watchdog_count; | |
} | |
ISR(PCINT0_vect) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from __future__ import print_function | |
from pyVim import connect | |
from pyVmomi import vim | |
si = connect.SmartConnect(host='vcsa', user='my_user', pwd='my_password') | |
content = si.RetrieveContent() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<root> | |
<item> | |
<name>Remap ShiftL + F19 to Caps Lock</name> | |
<appendix>(ShiftL + F19 to Caps Lock)</appendix> | |
<identifier>usercustom.f19_shift_l_to_caps</identifier> | |
<autogen> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
#!/usr/bin/env python | |
""" | |
Model for microformat properties and parsers. A microformat parser can | |
parse an HTML element into a dictionary of properties, whose keys are | |
strings and whose values are strings or other dictionary of properties. | |
As an example, the main program of this script parses an hResume from | |
given URL. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.shortcuts import render | |
class RestfulView(object): | |
allowed_methods = ["GET", "POST"] | |
def __call__(self, request, *args, **kwargs): | |
if request.method not in self.allowed_methods or not hasattr(self, request.method): | |
return self.method_not_allowed(request) | |
return getattr(self, request.method)(request, *args, **kwargs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; The fist version. Tricky and workarounded. | |
;; you can test it on this: | |
;; var BITS = ( 29, 0, 63, 85, 34 ) | |
(defun bit-compact (start end) | |
(interactive "r") | |
(defun int-to-binary-string (i) | |
"convert an integer into it's binary representation in string format" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <inttypes.h> | |
// OLED hardware versions | |
#define OLED_V1 0x01 | |
#define OLED_V2 0x02 | |
// commands | |
#define LCD_CLEARDISPLAY 0x01 |
NewerOlder