Skip to content

Instantly share code, notes, and snippets.

View voldmar's full-sized avatar

Volodymyr Epifanov voldmar

View GitHub Profile
@voldmar
voldmar / dabblet.css
Created May 17, 2014 13:51
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
@voldmar
voldmar / gist:7d86ece6f1b37d274767
Last active August 29, 2015 14:20
AppleScript interface to typograf.artlebedev.ru
on ProcessText(sentence)
tell application "http://typograf.artlebedev.ru/webservices/typograf.asmx"
return call soap {method name:"ProcessText", method namespace uri:"http://typograf.artlebedev.ru/webservices/", parameters:{|m:text|:sentence as string, |m:useP|:false as boolean, |m:useBr|:false as boolean, |m:entityType|:3 as integer}, SOAPAction:"http://typograf.artlebedev.ru/webservices/ProcessText"}
end tell
end ProcessText
set answer to ProcessText("миру - мир")
display dialog answer
#include <stdlib.h>
#include <stdio.h>
int main()
{
int m[5]={2, 8, 6, 5, 1};
int i = 1, j, c;
while (i < 5) {
j = 0;
#include <stdlib.h>
#include <stdio.h>
int main()
{
int m[]={2, 8, 6, 5, 1};
int i, j, temp;
for (i = 1; i < sizeof(m) / sizeof(int); i++) {
for (j = 0; j < i; j++) {
<!DOCTYPE html>
<div id="wrapper"></div>
<script>
var limit = 100;
var step = 256 / limit;
var wrapper = document.getElementById('wrapper');
for (var color = 0; color < 256; color += step) {
color = Math.round(color);
console.log(color);
var span = document.createElement('span');
<!DOCTYPE html>
<div id="wrapper"></div>
<script>
var count = 30;
var start = 'ffcc00';
var end = '6699cc';
var sR = parseInt(start.slice(0, 2), 16);
var sG = parseInt(start.slice(2, 4), 16);
var sB = parseInt(start.slice(4, 6), 16);
var eR = parseInt(end.slice(0, 2), 16);
<Files "humans.txt">
ForceType 'text/plain; charset=utf-8'
</Files>
@voldmar
voldmar / pre-commit
Created September 30, 2011 10:04
git pre-commit hook that checks forgotten print’s and pyflakes errors
#!/bin/bash
cd ./$(git rev-parse --show-cdup)
result=$(mktemp /tmp/pre-commit.XXXXX)
STAGED=${STAGED:---staged}
changed_py=$(git diff --name-only --diff-filter=AM $STAGED | grep -E '\.py$')
changed_js=$(git diff --name-only --diff-filter=AM $STAGED | grep -E '\.js$')
[[ -z $changed ]] && exit 0
@voldmar
voldmar / django.py
Created October 26, 2011 10:54 — forked from plq/django.py
django wrapper for rpclib
# coding: utf-8
# Fork of https://gist.github.com/1242760
from django.http import HttpResponse
from rpclib.server.wsgi import WsgiApplication
class DjangoApplication(WsgiApplication):
def __call__(self, request):
django_response = HttpResponse()
@voldmar
voldmar / vim.rb
Created December 31, 2011 08:35
Fresh homebrew formula for Vim
# To use this recipe you have to:
# $ brew install python --framework
# $ mkdir ~/Frameworks
# $ ln -s "/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework" ~/Frameworks
# $ brew install ./vim.rb
require 'formula'
require 'open-uri'
class Vim < Formula