Skip to content

Instantly share code, notes, and snippets.

@ozero
ozero / translate.py
Last active August 29, 2019 10:42 — forked from tomoconnor/translate.py
Machine Translation of .po files with Google Translate
#### Requires ####
# goslate==1.3.0
# polib==1.0.5
#### / ####
import os, sys
import goslate
import argparse
import polib
@ozero
ozero / IITC-neutralized_marker_style.user.js
Last active July 2, 2020 11:01
IITC-neutralized_marker_style.user.js
// ==UserScript==
// @id IITC-neutralized_marker_style
// @name IITC: Neutralized marker style
// @author ozero
// @category Misc
// @version 0.25.1.20190426.01
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL none
// @downloadURL none
// @description neutralized marker style
@ozero
ozero / my_bwmap.mrules
Created September 10, 2018 11:17
Maperitiveで白地図svgざっくりゲットを試してみたmrulesファイル試し書き
// Wireframe rules
// Created by Igor Brejc
// Edited by Rory Fitzpatrick
// Released under the Creative Commons Attribution-ShareAlike 3.0 License (http://creativecommons.org/licenses/by-sa/3.0/)
features
points, areas
bus stop : highway=bus_stop
railway station : railway=station
@ozero
ozero / mi3_replaceall_macro_sample.js
Created July 18, 2018 08:42
テキストファイル 一括置換マクロ Mi3 ( http://www.mimikaki.net/ ) 専用。Mi2以前は不可。
/*
OSX ミミカキエディット3 向け テキストファイル 一括置換 JSマクロ
Mi3 ( http://www.mimikaki.net/ ) 専用。Mi2以前は不可。
mi3 jsリファレンス
https://www.mimikaki.net/mi3/help/ja/JavaScript.htm
*/
@ozero
ozero / slack_deleteOldFiles.php
Last active March 12, 2018 11:58
Delete old and big files on Slack.
<?php
$token ='******PASTE YOUR TOKEN HERE******';
$count = 100;
/*
Delete old and big files on Slack.
- 10MB over: can be stored up to 3 months
@ozero
ozero / FxxK_UR_Bikeshed-discussion_language.swift
Created May 17, 2017 13:25
UIImageView cross-fade slideshow autoplay repeat sample in Swift 3 without rotten pods
class ViewController: UIViewController {
var imagesArraySlideshow : [UIImage] = []
var slideShowIndex:NSInteger = 0
var slideShowMax:NSInteger = 0
var ivSlideshow:UIImageView = UIImageView()
override func viewDidLoad() {
super.viewDidLoad()
$(".im_history_message_wrap").each(function(){
var el = $(this);
var date = $(".im_message_date",this).data('content');
var user = $(".im_message_author",this).text();
var reply_from = $(".im_message_reply_author span",this).text();
var reply = $(".im_message_reply_body .im_short_message_text",this).text();
reply = (reply != "")?"( " + reply_from + ": " + reply + " ) : " : "";
reply.replace(/\r/g, "");
reply.replace(/\n/g, "");
var body = $(".im_message_text",this).text();
@ozero
ozero / post-comm-multiline.user.js
Last active January 22, 2022 04:11
IITC plugin: Post comm in multi-line
// ==UserScript==
// @id iitc-plugin-post-comm-multiline
// @name IITC plugin: Post comm in multiline
// @category Misc
// @version 0.2.0.20220122.02
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL none
// @downloadURL none
// @description Post comm in multiline
// @include https://*.ingress.com/*
@ozero
ozero / iitc_flag_comm.user.js
Last active July 16, 2017 12:02
IITC plugin: flag comm as spam
// ==UserScript==
// @id iitc-plugin-flag-comm-as-spam
// @name IITC plugin: flag comm as spam
// @category Misc
// @version 0.1.0.20160831.120000
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL none
// @downloadURL none
// @description Flag spamming comm in 3 click.
// @include https://www.ingress.com/intel*
/*
1. open member list and scroll to end of end.
2. exec this snippet in js console.
*/
var anc = document.getElementsByClassName("dUF9n");
var result = [];
for (var i=0;i<anc.length;i++){
result.push(anc[i].getAttribute("href"));
}