This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Magnet-Transmission | |
// @namespace http://fopina.co.cc | |
// @description PirateBay + Transmission | |
// @include https://thepiratebay.se/* | |
// @include http://thepiratebay.se/* | |
// ==/UserScript== | |
unsafeWindow.sendToTransmission = function(href) { | |
setTimeout(function(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' Small Outlook-VBA script to push a new email notification to your iOS device | |
' using QPush (https://qpush.me/) | |
' | |
' Just install the application on your iOS device, choose a Push Name | |
' and place that and the generated Push Code in the section below | |
' | |
' How to add the script to Outlook? | |
' - Press Alt-F11 in Outlook to open Builtin VBA Editor | |
' - Paste this code in "ThisOutlookSession", save and exit edtior | |
' - Create a rule with the action "run script" and select the saved script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
I wanted to migrate all my gitosis repositories to gitlab.com. | |
Compile a list with the repositories in text file and run this script with your GITLAB token, the name of the text file and a directory to be used to clone the repositories temporarily. | |
Example: | |
python repo2gitlab.py x1xxxxxxxxxxX1Xx1xXX repos.txt /tmp/ | |
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Requires python-redmine and gitlab3 (both available with pip) | |
Copy all issues from a Redmine server to Gitlab for the projects specified in a text mapping the projects such as: | |
redmine_project_identifier:gitlab_project_identifier_with_namespace | |
rmproject:fopina/glproject | |
''' | |
from redmine import Redmine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from urllib2 import Request, urlopen | |
import json | |
import sys | |
URL = 'https://api-v2launch.trakt.tv' | |
# create your own app | |
API_KEY = '' | |
SECRET = '' | |
PIN_URL = 'https://trakt.tv/pin/????' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
''' | |
pip install pysqlite | |
pip install unqlite | |
''' | |
import sqlite3 | |
from unqlite import UnQLite | |
import timeit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Sometimes we need to use a model in peewee that we want to get from DB or create if it doesn't exist. | |
We have get_or_create and create_or_get for that. | |
But what if it don't really want the instance of the model? We simply want to create it (for logging purposes maybe)? | |
Is there a faster method than these two, assuming we will be inserting a lot of duplicate records? | |
I usually simply do: | |
try: | |
Model.create(...) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib2 | |
import urllib | |
def qpushit(name, code, message): | |
data = urllib.urlencode({ | |
'name': name, | |
'code': code, | |
'sig': '', | |
'cache': False, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Scraper script for emuparadise.me | |
Usage | |
===== | |
``` | |
fopina$ ./emuparadise.py -h | |
usage: emuparadise.py [-h] [--download] [--search] [--system SYSTEM] [--list] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
DIR=$(mktemp -d) | |
function setup_venv() { | |
cd $DIR | |
virtualenv env | |
. env/bin/activate |
OlderNewer