Skip to content

Instantly share code, notes, and snippets.

@avtehnik
avtehnik / generator.php
Last active August 29, 2015 14:03
ios splashscreen generator
<?php
$sizes = array(
array('n' => 'Default.png', 'w' => 320, 'h' => 480),
array('n' => 'Default@2x.png', 'w' => 640, 'h' => 960),
array('n' => 'Default@2x~ipad.png', 'w' => 2048, 'h' => 1496),
array('n' => 'Default~ipad.png', 'w' => 768, 'h' => 1004),
array('n' => 'Default-Landscape.png', 'w' => 1024, 'h' => 768),
array('n' => 'Default-Landscape@2x.png', 'w' => 2048, 'h' => 1536),
array('n' => 'Default-568h@2x.png', 'w' => 640, 'h' => 1136),
@avtehnik
avtehnik / acs712
Last active August 29, 2015 14:07
math of acs712
http://www.mpja.com/download/ACS712.pdf
<div>vcc <input id="vcc" value="5" /></div>
<div>vout <input id="vout" value="4.5" /></div>
<div>result <input id="va"/></div>
<script>
var vcc = document.id('vcc');
<?php
$sizes = array(
array('n' => 'Default.png', 'w' => 320, 'h' => 480),
array('n' => 'Default@2x.png', 'w' => 640, 'h' => 960),
array('n' => 'Default@2x~ipad.png', 'w' => 2048, 'h' => 1496),
array('n' => 'Default~ipad.png', 'w' => 768, 'h' => 1004),
array('n' => 'Default-Landscape.png', 'w' => 1024, 'h' => 768),
array('n' => 'Default-Landscape@2x.png', 'w' => 2048, 'h' => 1536),
array('n' => 'Default-568h@2x.png', 'w' => 640, 'h' => 1136),
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp"></script>
<div id="map-canvas"></div>
function initialize() {
var myLatlng = new google.maps.LatLng( 49.4272769152388, 32.05879211425781);
var mapOptions = {
zoom: parseInt(gup('z', 13)),
center: myLatlng,
mapTypeId: google.maps.MapTypeId.SATELLITE
<?php
require_once './vendor/autoload.php';
$auth = getjump\Vk\Auth::getInstance();
$auth->setAppId('ddddd')->setScope('SCOPE')->setSecret('dsasdads')->setRedirectUri('http://vk.loc/index.php');
$token = $auth->startCallback();
$vk = getjump\Vk\Core::getInstance()->apiVersion('5.5')->setToken($token);
/*
* ----------------------------------------------------------------------------
* This is a MFRC522 library example; see https://github.com/miguelbalboa/rfid
* for further details and other examples.
*
* NOTE: The library file MFRC522.h has a lot of useful info. Please read it.
*
* Released into the public domain.
* ----------------------------------------------------------------------------
#include <user_config.h>
#include <SmingCore/SmingCore.h>
#include <Libraries/BMP180/BMP180.h>
#define WIFI_SSID "ekreative" // Put you SSID and Password here
#define WIFI_PWD "*******"
#define DOR_PIN 5
#define NARODM_HOST "narodmon.ru"
#define NARODM_PORT 8283
@avtehnik
avtehnik / gps.py
Last active November 21, 2015 18:12
u-blox neo-6
#!/usr/local/bin/python
import serial
import sys
from math import pow, degrees, radians, acos
from scipy import cos, sin, arctan, sqrt, arctan2
<html slick-uniqueid="1"><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title> - jsFiddle demo</title>
<script type="text/javascript" src="http://fiddle.jshell.net/js/lib/mootools-core-1.3.2-compat.js"></script>
<script type="text/javascript" src="http://fiddle.jshell.net/js/lib/mootools-more-1.3.2.1-full-compat.js"></script>
<link rel="stylesheet" type="text/css" href="http://fiddle.jshell.net/css/result-light.css">
<style type="text/css"></style>
<script type="text/javascript">//<![CDATA[
"require": {
"zendframework/zendgdata": "2.0.*"
},
  private function googleLogin() {
$service = \ZendGData\Spreadsheets::AUTH_SERVICE_NAME;