Skip to content

Instantly share code, notes, and snippets.

@targi
targi / TransmissionClient
Created March 15, 2014 22:44
An Open In handler for Pythonista that uploads the file which name was passed to the configured server via SFTP, then runs the configured command on that server (e.g., transmission add).
import console
import paramiko
import keychain
import traceback
from os.path import basename
# TransmissionClient
#
# An Open In handler that uploads the file which name was passed
@targi
targi / pointer
Created March 16, 2014 20:27
Пример работы с указателем на что угодно (Turbo Pascal).
program PointerTest;
type
IntPtr = ^integer;
var
src, dst : integer;
intp : IntPtr;
p : Pointer;
begin
src := 42;
dst := 0;
@targi
targi / snake.py
Last active March 5, 2017 17:55
snake.py – a quick-and-dirty Pythonista 3 snake game
#
# Snake
# a quick and dirty Pythonista 3 game
#
# Oleg Frantsuzov, 2017
#
# consider this code public domain
from scene import *
from random import randrange
@targi
targi / gistcheck.py
Created March 15, 2017 19:15 — forked from spencerogden/gistcheck.py
Script for use with Pythonista to allow Github Gists for script storage and retrieval. Copy script in full into a new script in Pythonista called "gitcheck". Run the script and it will create 4 scripts starting with "Gist". These can be added to the action menu. See comments for more details.
# Source: https://gist.github.com/4702275
#
# All-purpose gist tool for Pythonista.
#
# When run directly, this script sets up four other scripts that call various
# functions within this file. Each of these sub-scripts are meant for use as
# action menu items. They are:
#
# Set Gist ID.py - Set the gist id that the current file should be
# associated with.
@targi
targi / slack2html.php
Last active June 4, 2021 11:47 — forked from levelsio/gist:122907e95956602e5c09
slack2html
<?
/////////////////////
// slack2html
// by @levelsio
/////////////////////
//
/////////////////////
// WHAT DOES THIS DO?
/////////////////////
//