Skip to content

Instantly share code, notes, and snippets.

View nazrdogan's full-sized avatar
🎯
Busy

Nazır Doğan nazrdogan

🎯
Busy
View GitHub Profile
@nazrdogan
nazrdogan / app.js
Created May 31, 2014 20:15
Arduino Socket.io App
// Setup basic express server
var express = require('express');
var app = express();
var server = require('http').createServer(app);
var io = require('socket.io')(server);
var port = process.env.PORT || 3000;
var mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/veri');
@nazrdogan
nazrdogan / index.html
Created May 31, 2014 20:22
Arduino Socket.io index.html
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<script src="/socket.io/socket.io.js"></script>
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<script>
@nazrdogan
nazrdogan / watersensor.ino
Created June 1, 2014 09:55
Arduino Su Sensorü
const int VAL_PROBE = 0; // Analog pin 0
const int MOISTURE_LEVEL = 250; // the value after the LED goes ON
void setup() {
Serial.begin(9600);
}
void LedState(int state) {
digitalWrite(13, state);
}
void loop() {
int moisture = analogRead(VAL_PROBE);
@nazrdogan
nazrdogan / app.js
Created June 1, 2014 13:15
Arduino'yla Socket.io üzerinden Yılan oyunu
// Setup basic express server
var express = require('express');
var app = express();
var server = require('http').createServer(app);
var io = require('socket.io')(server);
var port = process.env.PORT || 3000;
server.listen(port, function () {
// console.log('Server listening at port %d', port);
@nazrdogan
nazrdogan / tizencrash.log
Created June 1, 2014 22:00
Tizen Crash log
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f428034d2a1, pid=10686, tid=139926376081152
#
# JRE version: Java(TM) SE Runtime Environment (7.0_55-b13) (build 1.7.0_55-b13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.55-b03 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [libsoup-2.4.so.1+0x6c2a1] soup_session_feature_detach+0x11
#
@nazrdogan
nazrdogan / selfexecutingwithtime.js
Created June 2, 2014 12:57
Javascriptte zamanla kendi kendine çalışan fonksiyon
(function myFunction() {
setInterval(
function()
{
console.log('TEST');
}, 1000);
})();
@nazrdogan
nazrdogan / gist:d69655d8e0a940e3b04b
Created June 3, 2014 17:11
Tizen IDE creating yeni proje
-Dorg.eclipse.swt.browser.DefaultType=mozilla
var hint = 'Please make the description as accurate as possible.';
hintText(hint);
textArea.addEventListener('focus', function(e) {
if(textArea.value == hint){
textArea.setValue("");
}
});
textArea.addEventListener('blur', function(e) {
// create tab group
var tabGroup = Titanium.UI.createTabGroup({
});
var db = Ti.Database.open('photoDB');
//
// create base UI tab and root window
//
var win1 = Titanium.UI.createWindow({
title: 'Tab 1',
@nazrdogan
nazrdogan / titanium.js
Last active August 29, 2015 14:02
Titanium
// create tab group
var tabGroup = Titanium.UI.createTabGroup({
});
var tags=[];
var db = Ti.Database.open('photoDB');
//
// create base UI tab and root window