Skip to content

Instantly share code, notes, and snippets.

@dim0xff
dim0xff / main.go
Created April 15, 2023 16:29
yahoo-finance-proxy
/*
yahoo-finance-proxy - прокси получения котировок из Yahoo Finance для https://github.com/KonishchevDmitry/investments
Работает на 15 апр 2023
В config.yaml добавить
quotes:
custom_provider:
url: http://127.0.0.1:12345
@dim0xff
dim0xff / data.formated.json
Created April 12, 2017 20:40
mi tv 3s 60"
{
"blocks" : [
{
"id" : "FL/17",
"src" : "/tv/lean/fl/in?id=17",
"stat" : {
"tp" : "channel"
},
"title" : "Проба"
},
@dim0xff
dim0xff / t.pl
Created December 28, 2015 13:01
Add ability to user provide default values to moose attributes via import
#!/usr/bin/env perl
use v5.14;
use strict;
use warnings;
package T {
use Moose;
use vars qw(%defaults);
@dim0xff
dim0xff / OrderedActions.pm
Created March 24, 2015 16:46
CatalystX::OrderedActions
package CatalystX::OrderedActions;
use Moose::Role;
use namespace::autoclean;
use Carp;
use Scalar::Util 'looks_like_number';
use List::MoreUtils 'uniq';
use Data::Dumper;
@dim0xff
dim0xff / matching.pl
Last active August 29, 2015 14:17
Catalyst matching order
use strict;
use warnings;
use Test::Most;
use lib 't/lib';
use HTTP::Request::Common qw(GET POST DELETE PUT);
package MyApp::Controller::Root {
use Moose;
@dim0xff
dim0xff / pup
Last active August 29, 2015 14:08
javascript:(function(){
var getXmlHttp = function () {
var xmlhttp;
try {
xmlhttp = new ActiveXObject('Msxml2.XMLHTTP');
} catch (e) {
try {
xmlhttp = new ActiveXObject('Microsoft.XMLHTTP');
} catch (e) {
javascript:(function () {
var $j, getPage, add_scripts;
getPage = function (num) {
$j.get('http://gaga.aliexpress.com/?page=' + num).done(function (data) {
var $products = $j('#products-wrap');
var $children = $j(data).find('#products-wrap').children();
if ($children.length) {
$children.each(function (idx, el) {
$j(el).appendTo($products);
javascript:(function(){
var getXmlHttp = function () {
var xmlhttp;
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {
xmlhttp = false;
@dim0xff
dim0xff / Speedup.pm
Last active December 26, 2015 21:59
just a try to speedup Repeatable fields Put into HTML/FormHandlerX/Field/TraitFor/Repeatable/Speedup.pm
package HTML::FormHandlerX::Field::TraitFor::Repeatable::Speedup;
=head1 NAME
HTML::FormHandlerX::Field::TraitFor::Repeatable::Speedup - just a try to speedup
Repeatable fields
=head1 DESCRIPTION
Every time you validate your form, which has Repeatable fields, for each value in input for