Skip to content

Instantly share code, notes, and snippets.

🤷‍♂
¯\_(ツ)_/¯

Tomek Wójcik tomekwojcik

🤷‍♂
¯\_(ツ)_/¯
Block or report user

Report or block tomekwojcik

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
@tomekwojcik
tomekwojcik / wtfpasswdapi.md
Created Dec 24, 2011
Why The Fuck Should I Use An API For "What The Fuck Should I Use For Password"?
View wtfpasswdapi.md

Why The Fuck Should I Use An API For "What The Fuck Should I Use For Password"?

What The Fuck Should I Use For Password? wouldn't be much of a Web 2.0 app if it didn't provide an API. Using this API you can get a pseudo-random string in JSON or plaintext form.

Query format

http://whatthefuckshouldiuseforpassword.com/*format*?*query_string*

Formats

View stest.php
<?php
class string {
protected $_src = null;
public function __construct($src = '') {
$this->_src = $src;
}
public function __toString() {
return $this->_src;
@tomekwojcik
tomekwojcik / proptest.py
Created May 10, 2012
Python @Property vs direct access
View proptest.py
# -*- coding: utf-8 -*-
from timeit import timeit
setup = """\
class Test(object):
def __init__(self, something):
self._something = something
@property
def something(self):
View pythonmagick_osx.md

Installing PythonMagick on OS X

  1. brew install boost - will take a lot of time and make your Mac hot
  2. brew install --with-magick-plus-plus imagemagick
  3. cd <path_to_PythonMagick_source>
  4. ./configure --with-boost=<path_to_boost_root>
  5. make
  6. make install
  7. python -c "import PythonMagick"
View ram_db.py
from UserDict import UserDict
class RamDB(UserDict):
pass
@tomekwojcik
tomekwojcik / hack.sh
Last active Feb 22, 2017 — forked from erikh/hack.sh
OSX For Hackers
View hack.sh
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
You can’t perform that action at this time.