Skip to content

Instantly share code, notes, and snippets.

$(document).ready(function(){ldelim}
setInterval(Tab2,10000);
setInterval(Tab3,20000);
setInterval(Tab1,30000);
});
@shibby
shibby / osanalytics.js
Created October 7, 2012 23:45
PhoneGap Old School Analytics
/*Open DB*/
var db = window.openDatabase("yourdbname", "dbversion", "DbName", 1000000);
/*Get device connection type*/
var connection = checkConnection();
var d = new Date(); /* You have to use time i think. d.getTime() will return milliseconds date */
var db = window.openDatabase("eskisehir", "1.0", "AndroidArge", 1000000);
if (connection != "false"){
/*Sending tracking variables to api*/
$.post("yourapiaddress",

Sass/Less Karşılaştırması

Bu dökümanda, size referans olabilecek Sass/Less karşılaştırması yapılacaktır. Dökümanın orjinali ingilizcedir ve ... adresinden ulaşılabilir.

Variables

Sass             | Less
-----------------+-----------------
$color: red;     | @color: red;

div { | div {

server {
listen 80;
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/guven.atbakan.com/cert.pem;
ssl_certificate_key /etc/letsencrypt/live/guven.atbakan.com/privkey.pem;
server_name guven.atbakan.com www.guven.atbakan.com;
root /var/www/guvenatbakan.com/web/blog;
<?php
class Customer extends Eloquent {
protected $with = ['clients'];
public function clients()
{
return $this->hasMany('Client');
}
}
@shibby
shibby / webcam.sh
Created September 20, 2016 17:52
take picture using webcam
#!/bin/bash
datetime=`date +"%y-%m-%d-%T"`;
filename="/home/guven/webcam/cam-$datetime";
filename+=".jpeg";
echo "streamer -f jpeg -s 1280x720 -o $filename";
status=`streamer -f jpeg -s 1280x720 -o $filename`;
<?xml version="1.0" encoding="UTF-8"?>
<TaskOptions>
<TaskOptions>
<option name="arguments" value="fix $FileDir$/$FileName$ --rules=@PSR2" />
<option name="checkSyntaxErrors" value="true" />
<option name="description" value="fix code style" />
<option name="exitCodeBehavior" value="NEVER" />
<option name="fileExtension" value="php" />
<option name="immediateSync" value="false" />
<option name="name" value="php-cs-fixer" />
(
3959 *
acos(
cos( radians(42.290763) ) *
cos( radians( locations.lat ) ) *
cos(
radians( locations.lng ) - radians(-71.35368)
) +
sin( radians(42.290763) ) *
sin( radians( locations.lat ) )