Skip to content

Instantly share code, notes, and snippets.

View kkirsanov's full-sized avatar

Kirill Kirsanov kkirsanov

  • EY
  • Moscow, russia
View GitHub Profile
def mkTele2Transaction(short_name):
class Tele2Transaction(RfiValidation):
PARAMS_MAP = {'income': 'income',
'our_income': 'our_income'}
CHANNEL_SHORT_NAMES = [short_name]
class Meta:
proxy = True
app_label = 'payout'
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
</head>
<body>
<style type="text/css">
.tablelike {
display: table;
}
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
</head>
<body>
<script type="text/javascript">
function renew(){
@kkirsanov
kkirsanov / afrek.js
Last active December 12, 2015 10:39
показ заданного html через указанное время просмотра, учитывая переходы между страницами + требование минимального перехода по ссылкам между страницами
<script type="text/javascript">
var afrek_max = 15; // Сколько секунд пользователь должен пробыть на сайте
var afrek_days = 2; // сколько дней живет кука
var maxafrek_links = 3; // сколько переходов между страницами должно быть, для срабатывания кода
var afrek_html = "<img src='http://www.google.com/reader/ui/537640976-reader-logo-en.gif?hl=en'>";
// какой HTML код вставлять по истечении времени
function afrek_getCookie(c_name) {
var i, x, y, ARRcookies = document.cookie.split(";");
for (i = 0; i < ARRcookies.length; i++) {
import Data.List
import Data.Digest.CRC32 (crc32)
import Codec.Binary.UTF8.String(encode)
split :: String->String->[String]
split [] _ = []
split st ch = start : split ending ch where
checkChars :: String->Char->Bool
checkChars [] _ = False
--If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.
--Find the sum of all the multiples of 3 or 5 below 1000.
mapf fs x = map ($ x) fs
mod' x = (0==) . flip mod x
mods = [3, 5]
lst = [1..999]
flt = filter f lst where
@kkirsanov
kkirsanov / gist:2284256
Created April 2, 2012 15:13
максимальный перфикс дефкодов tele2
import Data.List
import qualified Data.Set as Set
st = "7900219,7900220,7900221,7900222,7900223,7900224,7900225,7900226,7900227,7900228,7900229,790023,790024,790025,790026,790027,790028,7900290,7900291,7900292,7900293,7900294,7900295,7900296,7900297,7900298,7900300,7900301,7900302,7900303,7900304,7900305,7900306,7900307,7900308,7900309,7900345,7900346,7900347,7900348,7900349,7900350,7900351,7900352,7900353,7900354,7900355,7900356,7900357,7900358,7900359,790036,7900370,7900371,7900372,7900373,7900374,7900455,7900456,7900457,7900458,7900459,7900460,7900461,7900462,7900463,7900464,79004715,79004716,79004717,79004718,79004719,7900472,79004730,79004731,79004732,79004733,79004734,79004735,79004736,79004737,79004738,79004739,7900474,7900475,7900476,7900477,7900478,7900479,7900480,7900481,7900482,79004830,79004831,79004832,79004833,79004834,790213,7902147,7902148,7902149,790219,7902250,7902251,7902252,7902281,7902282,7902283,7902284,7902285,7902286,7902403,7902404,7902405,7902406,7902407,7902408,7902504,7902507,7904
<?php
header("Content-type: csv/plain");
$cursor="";
$id=$_GET['id'];#12345
$week=int($_GET['week']);
$year=int($_GET['year']);
@kkirsanov
kkirsanov / gist:1698123
Created January 29, 2012 10:09
memory scan
// testproc.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <string>
#include <iostream>
#include <conio.h>
#include <Windows.h>
#include <algorithm>
#include <vector>
@kkirsanov
kkirsanov / gist:1657299
Last active February 28, 2019 09:58
Парсер реплеев танков
{-# LANGUAGE DeriveDataTypeable, RecordWildCards #-}
import qualified Data.ByteString.Lazy as BL
import System.IO
import Control.Monad
import Data.Word (Word8)
import Data.Char
import Data.List
import Network.HTTP