Skip to content

Instantly share code, notes, and snippets.

View gerzhan's full-sized avatar

Nikolay Gerzhan gerzhan

View GitHub Profile
@gerzhan
gerzhan / serialport.js
Created October 6, 2015 03:21 — forked from monteslu/serialport.js
chrome serial port implementation for node serialport
/*global chrome*/
var EventEmitter = require('./events.js').EventEmitter;
var util = require('./util.js');
function SerialPort(port, options) {
var self = this;
var id;
var bytesToRead = options.buffersize || 1;
@gerzhan
gerzhan / server.js
Created September 28, 2015 04:56 — forked from smalltotem/server.js
hapi-swagger configuration with JWT authorization header
var dotenv = require('dotenv');
dotenv.load();
var Hapi = require('hapi');
var _ = require('lodash');
var jwt = require('jsonwebtoken');
var Joi = require('joi');
var PORT = process.env.PORT || 8001;
process.env.SHARED_SECRET = 'Change me in an env file';
@gerzhan
gerzhan / app.js
Last active September 15, 2015 01:43 — forked from jgoux/app.js
Ionic / AngularJS service wrapper for Web SQL API / SQLite-Cordova-Plugin
angular.module('myApp', ['ionic', 'myApp.services', 'myApp.controllers'])
.run(function(DB) {
DB.init();
});
@gerzhan
gerzhan / Ionic and ngCordova upload example
Last active September 11, 2015 15:03 — forked from sean-hill/Ionic and ngCordova upload example
Upload service for Ionic and ngCordova
Ionic and ngCordova upload example
@gerzhan
gerzhan / VCTargetsPath.reg
Last active August 29, 2015 14:26 — forked from No9/VCTargetsPath.reg
Reg file that cured error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. VCTargetsPath.reg is all that should be required
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\MSBuild\ToolsVersions\4.0]
"VCTargetsPath"="$(MSBuildExtensionsPath32)\\Microsoft.Cpp\\v4.0\\"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0]
"VCTargetsPath"="$(MSBuildExtensionsPath32)\\Microsoft.Cpp\\v4.0\\"
@gerzhan
gerzhan / dabblet.css
Created July 29, 2015 02:21 — forked from csssecrets/dabblet.css
Conic gradients test
/**
* Conic gradients test
* PASS if green gradient, FAIL if red.
*/
background: red;
background: conic-gradient(limegreen, green, limegreen);
min-height: 50%;
@gerzhan
gerzhan / helper_vanilla.js
Last active August 29, 2015 14:26
Vanilla Javascript helper function for CSS
/**
* CSS Secrets: Better Solutions to Everyday Web Design Problems. Lea Verou
*/
function $$(selector, context) {
context = context || document;
var elements = context.querySelectorAll(selector);
return Array.prototype.slice.call(elements);
}
@gerzhan
gerzhan / gist:5192a4991d546bbd2e48
Last active August 29, 2015 14:25 — forked from fernandojunior/gist:5166fc6f92354cc950c9
A modified Parse.FacebookUtils to use with the modified openFB
/**
* Based on Parse.FacebookUtils. A provider for use the modified openFB in Parse.
* @author Fernando Felix do Nascimento Junior*
**/
(function(root) {
root.Parse = root.Parse || {};
var Parse = root.Parse;
var _ = Parse._;
var PUBLIC_KEY = "*";
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->
<!-- Allow web app to be run in full-screen mode. -->
<meta name="apple-mobile-web-app-capable"
content="yes">
<!-- Make the app title different than the page title. -->
@-moz-document url-prefix("https://web.skype.com/en/")
{
.swx.themeBlue,
.swx .themeBlue,
.swx .themeWhite.side .recent.active
{
background-color: #cccccc !important;
fill: #00aff0 !important;
color: #ffffff !important;