Skip to content

Instantly share code, notes, and snippets.

View YokiToki's full-sized avatar
🖤

Stanislav Karakovskii YokiToki

🖤
View GitHub Profile
<?php
// Using: php -f timezone.php
$last_date = '';
$time = time();
for ($i=0; $i < $time; $i+=86400) {
$date = date('O', $i);
if($date !== $last_date) {
echo "|\n";
echo "|-> ".date(DATE_RFC2822, $i)."\n";
// Using: node timezone.js
var date;
var lastDate = new Date(-1);
var time = (new Date()).getTime();
for (var i = 0; i < time; i+=(86400 * 1000)) {
date = new Date(i);
if(date.getTimezoneOffset() !== lastDate.getTimezoneOffset()) {
console.log("|");
console.log("|-> %s", date);
@YokiToki
YokiToki / sim900_at.ino
Last active September 22, 2015 20:12
SIM900 Arduino Shield AT Serial
#include <SoftwareSerial.h>
SoftwareSerial SIM900(7, 8);
char incoming_char=0;
String inputString = ""; // a string to hold incoming data
boolean stringComplete = false; // whether the string is complete
void setup()
{
Serial.begin(19200); // for serial monitor