Skip to content

Instantly share code, notes, and snippets.

Work work

Wojtek Siudzinski suda

Work work
Block or report user

Report or block suda

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
suda / RCSwitch.cpp
Created Mar 18, 2014
RCSwitch for Spark Core
View RCSwitch.cpp
/* ========================= .cpp ================================= */
RCSwitch - Arduino libary for remote control outlet switches
Copyright (c) 2011 Suat Özgür. All right reserved.
- Andre Koehler / info(at)tomate-online(dot)de
- Gordeev Andrey Vladimirovich / gordeev(at)openpyro(dot)com
- Skineffect /
suda /
Created Nov 16, 2010
[Python] Simple backend for nginx memcached module
Simple backend for nginx memcached module
Written by Wojtek 'suda' Siudzinski <>
Nginx config:
location /static {
add_header X-Origin Memcached;
expires modified +48h;
suda /
Created Feb 4, 2011
[Python/Django] URL shortener (using official API)
Add GOOGL_KEY to your
import urllib2, simplejson
from django.conf import settings
def googl(url):
params = simplejson.dumps({'longUrl': url})
headers = { 'Content-Type' : 'application/json' }
req = urllib2.Request(''+settings.GOOGL_KEY, params, headers)
suda /
Created Nov 12, 2011 — forked from blackrobot/
Sample Django settings
Here's my sample Django settings for a project I recently did. Visit to see the explanation.
Updated to Django 1.3 by Wojtek 'suda' Siudzinski
import os
import socket
# Set DEBUG = True if on the production server
suda /
Created Dec 2, 2011
Simple Django view that returns list of user (identified by username and password POST parameters) basecamps from 37 Signals Launchpad
# -*- encoding: utf-8 -*-
from lxml import etree
from BeautifulSoup import BeautifulSoup
import simplejson
import urllib, urllib2
import cookielib
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
suda / gist:2037819
Created Mar 14, 2012
Issue Stand Authorization
View gist:2037819

User authorization in Issue Stand magazines is done by sending username and password to a dedicated page on publisher's server (preferably HTTPS) and checking the result.

###POST Parameters Parameters are sent just like any HTML form.

  • username - username entered by the user
  • password - password entered by the user

###Server response Response is encoded in JSON format

suda /
Created Dec 6, 2012
Check how much space Retina files (@2x) use up on your Mac's HDD
find /Applications/ -name "*@2x*" -exec ls -l {} \; | awk '{ total += $5 } END { total = total / 1024 / 1024; printf(" TOTAL SIZE OF RETINA FILES (MB): %4.2f\n", total)}'
# Modified file from
# This runs as root on the server
# Are we on a vanilla system?
if ! test -f "$chef_binary"; then
export DEBIAN_FRONTEND=noninteractive
# Upgrade headlessly (this is only safe-ish on vanilla systems)
suda / bytesex.h
Created Oct 3, 2013
bytesex.h with AMD64 and x86_64 architectures
View bytesex.h
/* Original code from the Linux C library */
/* Copyright (C) 2000,2001 Salvatore Sanfilippo <>
* This code is under the original GNU C library license (GPL) */
/* $Id: bytesex.h,v 2003/08/31 17:23:48 antirez Exp $ */
#if defined(__i386__) \
View query-synchronizer.js
* Module allowing to use Azure Mobile Services database on server side
* in a synchronous manner.
* Singleton based on
* @example
* var synchronizer = require('query-synchronizer');
*, function(results) {
* // Do something with the results
You can’t perform that action at this time.