Skip to content

Instantly share code, notes, and snippets.


Piotr Czapla PiotrCzapla

View GitHub Profile
View transforms v2

Here is an example how Transformations could look like in future:

class CoordTransform(Transform):
    def determ(self):
        return CoordAction(self, self.new_state())
    def new_state(self): return {}

class RandomRotate(CoordTransform):
    def __init__(self, deg, p=0.75, mode=cv2.BORDER_REFLECT):
PiotrCzapla / Import Discord Messages to
Last active Feb 22, 2018
Import Discord Messages to Slack
View Import Discord Messages to

How To

First you have to download your messages in json format, this bookmarklet works like a charm: You will end up with file like this:

  "meta": {
    "users": {}
  "data": {
brew install macvim --with-cscope --with-lua --override-system-vim --with-luajit --with-python3
# in case linking fails
rm $(which mvim)
brew link macvim
brew linkapps macvim
# making an alias after symlinking
PiotrCzapla / Add Last Email Sent to OmniFocus.applescript
Last active Dec 29, 2015 — forked from simplicitybliss/Add Last Email Sent to OmniFocus.applescript
Short AppleScript that adds the last email sent in to the OmniFocus Inbox as a task
View Add Last Email Sent to OmniFocus.applescript
Add last sent email to OmniFocus Script
by, Sven Fechner
Straight forward script that sends the last email sent in to OmniFocus either using the Quick Entry window or silently (well, with Growl based notifications if desired) straight to the Inbox.
You can influence how the task is named by modifying the PreFix and MidFix properties. The note of the task will contain a link back the email in
Use the AppleScript Menu or tools likle FastScripts, Launchbar or Alfred to trigger the script.
PiotrCzapla / cache.ccf
Created May 6, 2015
How to disable livesite cache
View cache.ccf
View deployAndRun.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<logRules maxBytes="32Mb" level="verbose"/>
<localNode host="localhost"/>
<definition name="PushToGit">
<remoteDiff area="/tmp/od"> <!-- just a dummy deploy -->
PiotrCzapla /
Created Apr 1, 2015
run http server (bash / python)
sudo python -m smtpd -n -c DebuggingServer localhost:25
PiotrCzapla /
Created Oct 7, 2013
A cygwin script to compare a content of workarea with content of STAGING
function tsurl() {
dir=$(realpath "$*");
echo "${dir/cygdrive\/y//localhost}"
function dump_ea_txt {
echo "Extracting extattrs maching $filter from $src to $dest"
PiotrCzapla / DebugUtils.h
Created Apr 5, 2012
Dump view hierarchy to NSLog
View DebugUtils.h
#import <Foundation/Foundation.h>
@interface DebugUtils : NSObject
* Dump view hierarchy to NSLog
+ (void) dumpViews:(UIView*)view;
You can’t perform that action at this time.