Skip to content

Instantly share code, notes, and snippets.

View IPRIT's full-sized avatar
💅

Alexander Belov IPRIT

💅
View GitHub Profile
@IPRIT
IPRIT / index.html
Created September 10, 2014 22:21
Yandex Shri
<!DOCTYPE html>
<html>
<head>
<title>Equalizer</title>
<script>
/*! jQuery v1.11.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m="1.11.0",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each
@IPRIT
IPRIT / designer.html
Created November 9, 2014 01:43
designer
<link rel="import" href="../paper-checkbox/paper-checkbox.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@IPRIT
IPRIT / designer.html
Created November 9, 2014 01:48
designer
<link rel="import" href="../paper-tabs/paper-tab.html">
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-input/paper-input.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
else if (match[4]) { // URL & e-mail
if (!options.noLinks) {
var matchEmojiInURL;
if (match[4].match(emojiRegex)) {
if (matchEmojiInURL = match[4].match(emojiRegex)) {
if ((emojiCode = emojiMap[matchEmojiInURL[0]]) &&
(emojiCoords = getEmojiSpritesheetCoords(emojiCode))) {
emojiTitle = encodeEntities(emojiData[emojiCode][1][0]);
emojiFound = true;
@IPRIT
IPRIT / Example
Last active August 29, 2015 14:17
using AsyncTask and Uri.Builder
import android.net.Uri;
import android.os.AsyncTask;
import android.util.Log;
import org.json.JSONException;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
@IPRIT
IPRIT / gist:34193b6218201bb9d582
Created March 25, 2015 18:10
Example ResponseParser
package ru.twosphere.android.misisbooks;
import android.util.Log;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
/**
* Created by Александр on 31.01.2015.
@IPRIT
IPRIT / gist:48e5a0b2961875a96f03
Last active August 29, 2015 14:17
HttpAsyncTask.fragment
public class HttpAsyncTask extends AsyncTask<URL, Integer, String> {
/**
* <URL, Integer, String> — URL::URL, Progress Report::Integer, Result::String
*/
private final String LOG_TAG = TestAsyncTask.class.getSimpleName();
public static final String POST_REQUEST_NAME = "POST";
public static final String GET_REQUEST_NAME = "GET";
doctype html
html
head
title= title
link(rel='stylesheet', href='/stylesheets/style.css')
body
block content
#!/bin/sh
basedir=`dirname "$0"`
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../jade/bin/jade.js" "$@"
ret=$?
var http = require('http');
module.exports = function(url, callback) {
http.get(url, function(res) {
res.setEncoding('utf8');
res.on('data', function(buf) {
callback(null, buf.toString());
});