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 <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 |
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
// 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); |
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
<?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"; |
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
#!/bin/bash | |
sudo apt-get update && sudo apt-get install python-gi && sudo apt-get install python-setuptools | |
wget https://pypi.python.org/packages/de/8c/f8f5d38b4f26893af267ea0b39023d4951705ab0413a39e0cf7cf4900505/python-pam-1.8.2.tar.gz | |
tar xfz python-pam-1.8.2.tar.gz | |
cd python-pam-1.8.2 | |
sudo python setup.py install |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<link href="https://rawgit.com/Semantic-Org/Semantic-UI/next/dist/semantic.css" rel="stylesheet" type="text/css"> | |
<script src="https://code.jquery.com/jquery-3.1.1.js" type="text/javascript"></script> | |
<script src="https://rawgit.com/Semantic-Org/Semantic-UI/next/dist/semantic.js" type="text/javascript"></script> | |
<style type="text/css"> | |
.ui.image { | |
width: 120px; |
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
$customer = Customers::find() | |
->where(['Customer_id' => $customer_id]) | |
->with('Orders') | |
->asArray() | |
->all(); | |
[ | |
{ | |
"Customer_id": "3", | |
"Serial_number": "102", |
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
#! /bin/sh | |
# /etc/init.d/ices | |
# | |
case "$1" in | |
start) | |
echo "Starting IceS..." | |
screen -A -m -d -S ices ices -c /usr/local/etc/ices.conf | |
echo "IceS started" | |
;; |
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
CREATE TABLE cbrf | |
( | |
cbrf_id SERIAL NOT NULL | |
CONSTRAINT "PK_cbrf" | |
PRIMARY KEY, | |
start_date DATE NOT NULL, | |
refinancing_rate DOUBLE PRECISION, | |
created TIMESTAMP DEFAULT now() NOT NULL | |
); |
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
<?php | |
// Look for token | |
$token = (isset($_GET['token']) && preg_match('/^[0-9a-f]{8}$/', $_GET['token'])) ? $_GET['token'] : false; | |
if (!$token) { | |
$token = sprintf('%08x', crc32(microtime())); | |
} | |
// get current minute, build APC key |
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
const fs = require("fs"); | |
const json = fs.readFileSync("out.json"); | |
const content = JSON.parse(json); | |
content.responses[0].hits.hits.map(function (obj) { | |
console.log('type', obj._source.type); | |
console.log('date', obj._source.date); | |
console.log('sequence', obj._source.sequence); | |
console.log(''); | |
}); |
OlderNewer