Skip to content

Instantly share code, notes, and snippets.

View tshirtman's full-sized avatar

Gabriel Pettier tshirtman

View GitHub Profile
@joepie91
joepie91 / vpn.md
Last active July 17, 2026 00:49
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.
from kivy.app import App
from kivy.uix.effectwidget import EffectWidget, EffectBase
from kivy.properties import StringProperty
GLSL = '''
vec4 basecolor = vec4(231./255., 193./255., 59./255., 1.);
vec4 black = vec4(0.0);
vec4 white = vec4(1.0);
vec4 col2 = vec4(247./255., 226./255., 156./255., 1.);
anonymous
anonymous / test_button.py
Created July 28, 2016 22:50
from kivy.base import runTouchApp
from kivy.lang import Builder
from textwrap import dedent
runTouchApp(Builder.load_string(
dedent(
'''
#:import Animation kivy.animation.Animation
<SoftButton@ToggleButtonBehavior+Label>
text: self.state
anonymous
anonymous / test_button.py
Created July 28, 2016 23:56
from kivy.base import runTouchApp
from kivy.lang import Builder
from textwrap import dedent
runTouchApp(Builder.load_string(
dedent(
'''
#:import Animation kivy.animation.Animation
<SoftButton@ToggleButtonBehavior+Label>
text: self.state
@tshirtman
tshirtman / shake.py
Last active September 7, 2021 01:19
a few tilt/grow/shake animations on buttons on press/release
from kivy.app import App
from kivy.lang import Builder
from kivy.animation import Animation
from kivy.factory import Factory
from random import gauss
KV = '''
<MagicButton@MagicWidget+Button>:
# build with
# docker build -f Dockerfile.buildozer -t buildozer .
# use the produced image with
# docker run -v your_project_dir:/root/build buildozer
# at the end of the run, the build directory in your project should contain the apk
# you can use the /root/.buildozer/ volume to cache your distributions (first usage may be longer)
FROM ubuntu:latest
RUN dpkg --add-architecture i386 &&\
@romainl
romainl / Vim_pushing_built-in_features_beyond_their_limits.markdown
Last active April 16, 2026 04:49
Vim: pushing built-in features beyond their limits

Vim: pushing built-in features beyond their limits

The situation

Searching can be an efficient way to navigate the current buffer.

The first search commands we learn are usually / and ?. These are seriously cool, especially with the incsearch option enabled which lets us keep typing to refine our search pattern. / and ? really shine when all we want is to jump to something we already have our eyeballs on but they are not fit for every situation:

  • when we want to search something that's not directly there, those two commands can make us lose context very quickly,
  • when we need to compare the matches.
from kivy.app import App
from kivy.animation import Animation
from kivy.clock import Clock
from kivy.lang import Builder
from kivy.properties import NumericProperty
from kivy.resources import resource_add_path
KV = '''
@tshirtman
tshirtman / main.py
Last active April 20, 2018 09:42
A little board game for two players, no attention paid to graphics, no AI yet.
from kivy.app import App
from kivy.animation import Animation
from kivy.uix.widget import Widget
from kivy.uix.button import ButtonBehavior
from kivy.uix.gridlayout import GridLayout
from kivy.properties import ListProperty, NumericProperty, \
ObjectProperty, StringProperty
class Cell(ButtonBehavior, Widget):
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.effectwidget import EffectBase
RND_BLUR = '''
// http://stackoverflow.com/a/21604810/1209937
// hash based 3d value noise
// function taken from https://www.shadertoy.com/view/XslGRr
// Created by inigo quilez - iq/2013
// License Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.