Skip to content

Instantly share code, notes, and snippets.

@wiiaboo
wiiaboo / Batch Render.v2.cs
Created November 29, 2012 02:43
BatchRender Vegas
/**
* Sample script that performs batch renders with GUI for selecting
* render templates.
*
* Revision Date: Nov. 29, 2012.
**/
using System;
using System.IO;
using System.Text;
using System.Drawing;
@wiiaboo
wiiaboo / gist:5478921
Created April 28, 2013 23:50
AnimeCalendar.net Sharingan mod
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document url("http://animecalendar.net/") {
/* apagar o sharingan cocó */
body {background: #111 !important}
/* eps por ver */
#calendarContent div.day td h3 a {color: #c00 !important;}
#calendarContent div.day td small {color: #900 !important;}
/* eps vistos */
#calendarContent div.day td.watched h3 a{color: #3a0 !important;}
@wiiaboo
wiiaboo / gist:5976420
Last active December 19, 2015 15:29
botdownload.pl
use Irssi;
use vars qw($VERSION %IRSSI);
$VERSION = "1.0";
%IRSSI = (
authors => 'RiCON',
contact => 'pararecebermerda\@gmail.com',
name => 'bot downloader',
description => 'a bot script, using ! followed by anything the script will say (as an action): gets nickname anything',
license => 'MIT',
#!/usr/bin/env python3
# ar-calc.pl - Web aspect ratio calculator
# Copyright (C) 2008-2011 Arne Bochem
# Copyright (C) 2014- Ricardo Constantino
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
const wchar_t* common_char_table = L",_ -+;.&|~";
int GetCommonCharIndex(wchar_t c) {
for (int i = 0; i < 10; i++)
if (common_char_table[i] == c)
return i;
return -1;
}
diff --git a/src/base/string.cpp b/src/base/string.cpp
index 37ca780..fcbce24 100644
--- a/src/base/string.cpp
+++ b/src/base/string.cpp
@@ -772,9 +772,11 @@ int GetCommonCharIndex(wchar_t c) {
return -1;
}
-wchar_t GetMostCommonCharacter(const wstring& str) {
+wchar_t GetMostCommonCharacter(const wstring& str2) {
# 1. "get information from google"
# 2. "parse json/xml"
# 3. "loop by tier"
# 4. "loop by component"
# 5. "split by name and link"
# ---
# Get data from Google Docs, parse the data, split by tier, each tier by components,
# get a component and its name and link.
from xml.dom import minidom
# por cada scraper
# criar classe correspondente
# cada scraper tem função get_price que diz o preço actual
# cada scraper tem timer, tem de se esperar X segundos por cada request para evitar quebrar scrapes
# cada scraper só se inicia uma vez por sessão
# criar scrapers para kuantokusta, alientech, moddingworld, chiptec, jifortec, pcdiga,
# usar time.sleep()
# import google
from requests import get
#!/bin/bash
#
# tc uses the following units when passed as a parameter.
# kbps: Kilobytes per second
# mbps: Megabytes per second
# kbit: Kilobits per second
# mbit: Megabits per second
# bps: Bytes per second
# Amounts of data can be specified in:
# kb or k: Kilobytes
https://r2---sn-2vgu0b5auxaxjvh-v2ve.googlevideo.com/videoplayback?source=youtube&key=yt5&itag=22&fexp=910118,913434,922924,923341,930008,930512,932617,934026,935015,948701&ip=188.80.206.173&ratebypass=yes&ipbits=0&expire=1402523954&mws=yes&sver=3&upn=iIZuPFvUkCs&signature=294274A87CD60B3A86FE4EEBCC1AFCAFDAE2F099.18090E634B35D25E966A0379E220CC8F7F062582&id=o-AMkU2UfpGfoOjfwjaJYD77I_bOcFFN5fCspgvuAxYOCP&sparams=gcr,id,ip,ipbits,itag,ratebypass,requiressl,source,upn,expire&requiressl=yes&mt=1402499509&mv=m&ms=au&gcr=pt&fallback_host=tc.v11.cache5.googlevideo.com&quality=hd720&title=Japão - Grupo C - Copa Aleixo (HD)