View dabblet.css
/**
* The first commented line is your dabblet’s title
*/
View gist:7d86ece6f1b37d274767
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
View bubble-sort.c
#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;
View bubble-sort.c
#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++) {
View spans.html
<!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');
View spans2.html
<!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);
View .htaccess
<Files "humans.txt">
ForceType 'text/plain; charset=utf-8'
</Files>
View pre-commit
#!/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
View django.py
# 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()
View vim.rb
# 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