Skip to content

Instantly share code, notes, and snippets.

Stanisław stsdc

Block or report user

Report or block stsdc

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
@stsdc
stsdc / scroll_to_bottom.py
Created Apr 4, 2019
GTK3 Scroll to bottom
View scroll_to_bottom.py
def __treeview_scroll_to_bottom( self, treeview, event, data=None ):
adj = treeview.get_vadjustment()
adj.set_value(adj.get_upper() - adj.get_page_size())
self.__activate_last_row(treeview)
@stsdc
stsdc / rPi3-ap-setup.sh
Last active Mar 5, 2018 — forked from Lewiscowles1986/rPi3-ap-setup.sh
Raspberry Pi 3 access-point-setup
View rPi3-ap-setup.sh
#!/bin/bash
#
# This version uses September 2017 august stretch image, please use this image
#
if [ "$EUID" -ne 0 ]
then echo "Must be root"
exit
fi
@stsdc
stsdc / opencvinstall.sh
Last active Sep 11, 2017 — forked from primetoxinz/opencvinstall.sh
Installs OpenCV for Raspberry Pi
View opencvinstall.sh
sudo apt-get install build-essential cmake pkg-config -y
sudo apt-get install libjpeg-dev libtiff5-dev libjasper-dev libpng12-dev -y
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev -y
sudo apt-get install libxvidcore-dev libx264-dev -y
sudo apt-get install libgtk2.0-dev libgtk-3-dev -y
sudo apt-get install libatlas-base-dev gfortran -y
sudo apt-get install python2.7-dev python3-dev -y
echo "Downloading OpenCV"
wget -O opencv.zip https://github.com/opencv/opencv/archive/3.3.0.zip
echo "Unzipping OpenCV"
@stsdc
stsdc / pixelsToCenter.js
Created Feb 27, 2016
Oblicza o ile pixeli przesunąć blok
View pixelsToCenter.js
// Oblicza o ile pixeli przesunąć kartę
function pixelsToCenter(block) {
var viewCenterX = Math.floor(window.innerWidth / 2);
var viewCenterY = Math.floor(window.innerHeight / 2);
var offset = block.offset();
return {
x: function() {
return viewCenterX - Math.floor(offset.left + block.outerWidth() / 2);
},
y: function() {
You can’t perform that action at this time.