Skip to content

Instantly share code, notes, and snippets.

View indeyets's full-sized avatar

Alexey Zakhlestin indeyets

View GitHub Profile
@indeyets
indeyets / calendar.html
Created November 17, 2012 12:37
Календарь зоны действия
<iframe src="https://www.google.com/calendar/embed?showCalendars=0&amp;showTz=0&amp;mode=AGENDA&amp;height=500&amp;wkst=2&amp;hl=ru&amp;bgcolor=%23FFFFFF&amp;src=9ir9pkisi285laj0buv9r3caug%40group.calendar.google.com&amp;color=%23B1440E&amp;ctz=Europe%2FMoscow" style=" border-width:0 " width="650" height="500" frameborder="0" scrolling="no"></iframe>
@indeyets
indeyets / rdf-types.yaml
Created March 14, 2012 12:48
RDF Types hierarchy (based on XQuery, XPath specifications)
data_types: # child-values can be used "as-is" if parent-type is requested
"xs:anyType":
"xs:untyped": {}
"xs:anySimpleType":
"xs:anyAtomicType":
"xs:untypedAtomic": {}
"xs:dateTime": {}
"xs:date": {}
"xs:time": {}
"xs:duration":
<?php
/**
* Mimics ant pattern matching.
* New addition (afaict): any pattern ending in '/' will only match directories
* @see http://ant.apache.org/manual/dirtasks.html#patterns
* @todo more complete testing
*/
function pake_antpattern($files, $rootdir)
{
$results = array();
@indeyets
indeyets / php-github.php
Created March 24, 2011 12:27
GitHub OAuth + API test
<?php
class GitHubAuth
{
const AUTH_URL = 'https://github.com/login/oauth/authorize';
const ACCESS_TOKEN_URL = 'https://github.com/login/oauth/access_token';
private $app_id;
private $app_secret;
from gi.repository import Midgard
class RdfMapper:
def __init__(self, mgd):
self.mgd = mgd
self.read_types()
def read_types(self):
for gtype in Midgard.Object.__gtype__.children:
self.read_type(gtype)
from gi.repository import Midgard
class RdfMapper:
def __init__(self):
self.read_types()
def read_types(self):
for gtype in Midgard.Object.__gtype__.children:
self.read_type(gtype)
import inspect
import gi
from gi.repository import Midgard
Midgard.init()
for name, obj in inspect.getmembers(Midgard):
if inspect.isclass(obj):
print(obj.__name__)
diff -Naurp gettext-0.18.1.1.orig/gettext-tools/configure gettext-0.18.1.1/gettext-tools/configure
--- 1/gettext-tools/configure 2010-06-06 13:12:20.000000000 -0700
+++ 2/gettext-tools/configure 2010-08-13 23:24:09.000000000 -0700
@@ -40606,7 +40606,9 @@ else
#include <stdlib.h>
#include <string.h> /* for strcpy */
/* The stpncpy prototype is missing in <string.h> on AIX 4. */
+#ifndef stpncpy
extern char *stpncpy (char *dest, const char *src, size_t n);
+#endif
tmp = [{'a': 'b'}, {'c': 'd'}]
for x in tmp:
for k in x.keys():
print("key: %s, value: %s" % (k, x[k]))
@indeyets
indeyets / gist:740344
Created December 14, 2010 12:25
mongrel2-appserver.conf
mongrel2 = Host(name="localhost", routes={
'/': Handler(
send_spec='tcp://127.0.0.1:9997',
send_ident='53f9f1d1-1116-4751-b6ff-4fbe3e43d142',
recv_spec='tcp://127.0.0.1:9996', recv_ident='')
})
main = Server(
uuid="82209006-86FF-4982-B5EA-D1E29E55D481",
access_log="/logs/access.log",