This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The first commented line is your dabblet’s title | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Files "humans.txt"> | |
ForceType 'text/plain; charset=utf-8' | |
</Files> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
OlderNewer