Skip to content

Instantly share code, notes, and snippets.

View kkszysiu's full-sized avatar
🦄
🧙🧙🧙┬─┬ ノ( ゜-゜ノ)🧙🧙🧙

Krzysztof Klinikowski kkszysiu

🦄
🧙🧙🧙┬─┬ ノ( ゜-゜ノ)🧙🧙🧙
View GitHub Profile
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 17 columns, instead of 4 in line 6.
id,device,timestamp,received_at,lon,lat,duration,speed_max,speed_avg,acceleration,braking,holes,cornering,plug_inserted,power_available,in_motion,engine_running
5624f17e758a771993d30d65,862950023269312,2015-10-19 13:33:56,2015-10-19 13:34:54.345000,0.04281166666666667,50.79389333333334,0,0,0,0,0,0,0,true,true,false,true
5624f17e758a771993d30d67,862950023269312,2015-10-19 13:34:13,2015-10-19 13:34:54.446000,0.044226666666666664,50.79376333333333,17,43,11,0,0,0,0,true,true,false,true
5624f17e758a771993d30d68,862950023269312,2015-10-19 13:34:19,2015-10-19 13:34:54.518000,0.04478166666666667,50.79375,6,40,27,0,0,0,0,true,true,false,true
5624f17e758a771993d30d6a,862950023269312,2015-10-19 13:34:20,2015-10-19 13:34:54.636000,0.04513833333333333,50.79374833333333,0,0,0,0,0,0,0,true,true,false,true
5624f17e758a771993d30d6c,862950023269312,2015-10-19 13:34:34,2015-10-19 13:34:54.836000,0.047065,50.793978333333335,14,51,38,0,0,0,0,true,true,false,true
5624f17e758a771993d30d6d,862950023269312,2015-10-19 13:34:44,2015-10
@kkszysiu
kkszysiu / gist:247c42dc9fd1d34a70a1
Last active June 24, 2021 03:52
Torchlight Linux
If you want to play on HumbleBundle edition of Torchlight you need old libSDL2 library.
Someone forgotten about that.
With latests libSDL2 it won't work. You will have issues with mouse pointer.
Cursor will have black outline. You won't be able to click on anything etc.
So I prepared modified libSDL2 lib which will able you to play this game with no issues.
https://drive.google.com/file/d/0B1WBC6JhUyLKZDRrTkxMVzA3S28/edit?usp=sharing
That's those libSDL libs. You need to copy it to lib64 dir where you've installed Torchlight, in my case it was /home/kkszysiu/.games/Torchlight/lib64/
""" Usage: python diff.py FILE1 FILE2
A primitive `diff` in 50 lines of Python.
Explained here: http://pynash.org/2013/02/26/diff-in-50-lines.html
"""
def longest_matching_slice(a, a0, a1, b, b0, b1):
sa, sb, n = a0, b0, 0
runs = {}
@kkszysiu
kkszysiu / robot.js
Created December 6, 2012 10:19
OMGPONIES
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(100);
@kkszysiu
kkszysiu / gist:4051321
Created November 10, 2012 14:58
Pyramid using mod_wsgi on alwaysdata.net on virtualenv
#!/home/pyramidtests/appsing_venv/bin/python
import os, sys
ALLDIRS = ['/home/pyramidtests/appsing_venv/lib/python2.6/site-packages/']
import sys
import site
# Remember original sys.path.
prev_sys_path = list(sys.path)
@kkszysiu
kkszysiu / gist:3770979
Created September 23, 2012 13:31
Vividas demuxer which is compiling with FFmpeg 0.11
/*
* Vividas VIV format Demuxer
* Copyright (c) 2012 Krzysztof Klinikowski
* Copyright (c) 2010 Andrzej Szombierski
* based on vivparse Copyright (c) 2007 Måns Rullgård
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@kkszysiu
kkszysiu / gist:1217311
Created September 14, 2011 18:16
Simple snippet for Onet Czat's authorisation procedure written in Java.
package a;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;