Skip to content

Instantly share code, notes, and snippets.

@DarkDust
DarkDust / Test.ino
Created May 1, 2017 11:51
AVR/GCC bug?
// NeoPixel Ring simple sketch (c) 2013 Shae Erisson
// released under the GPLv3 license to match the rest of the AdaFruit NeoPixel library
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif
// Which pin on the Arduino is connected to the NeoPixels?
// On a Trinket or Gemma we suggest changing this to 1
@DarkDust
DarkDust / invalidDate.swift
Created October 27, 2015 11:16
Invalid date in NSDateFormatter
let formatter = NSDateFormatter()
formatter.dateFormat = "y-M-d"
formatter.timeZone = NSTimeZone(name: "America/Sao_Paulo")
let components = NSDateComponents()
components.day = 19
components.month = 10
components.year = 2015
let date = NSCalendar(calendarIdentifier: NSCalendarIdentifierGregorian)!.dateFromComponents(components)