Skip to content

Instantly share code, notes, and snippets.

я котик пур-пур mvasilkov

Block or report user

Report or block mvasilkov

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
mvasilkov / somoto_task.html
Last active Nov 26, 2019
Вороны клюют твою задачу, Джузеппе!
View somoto_task.html
<!doctype html>
<html lang="en">
<meta charset="utf8">
<title>Crows peck at your crops, Giuseppe!</title>
#thing {
height: 100px;
width: 100px;
mvasilkov / auth_form.js
Created Jun 25, 2019 modal form with wrappedComponentRef
View auth_form.js
import React from 'react'
import { Form, Input } from 'antd'
import lang from '../app/lang'
export default Form.create({ name: 'auth' })(
class AuthForm extends React.Component {
render() {
const { getFieldDecorator } = this.props.form
import Image, ExifTags
try:, fileName))
for orientation in ExifTags.TAGS.keys():
if ExifTags.TAGS[orientation]=='Orientation': break
if exif[orientation] == 3:
image=image.rotate(180, expand=True)
View content_script.js
var res = []
function parse(node) {
var i, a, name = node.tagName.toLowerCase()
res.push({type: 'o', name: name})
for (i = 0; i < node.attributes.length; ++i) {
mvasilkov / bash jmp
Created Feb 21, 2015
Bash jmp script
View bash jmp
function jmp { cd -P "$JMP_PATH/$1" 2>/dev/null || echo Not found; }
function setjmp { ln -s "`pwd`" "$JMP_PATH/$1"; }
function deljmp { rm -i "$JMP_PATH/$1"; }
export JMP_PATH="$HOME/.jmp"
import os
import sys
import io
import tarfile
import urllib.request
# Tests for antialiasing a high-frequency image in various ways
# Nathan Reed, July 2014
# Written for Python 3.4; requires numpy and Pillow to be installed
import concurrent.futures
import math
import multiprocessing
import numpy as np
import optparse
import random
View music_formula_collection.txt
Collection of oneliner music formulas. Version 2011-10-18
I've tried to collect all the formulas in the related threads etc.
(excluding those that clearly sound like random first experiments or total
crap; when several variants are available, i've chosen the shortest one)
If you think I've missed something that should be here, please let me know.
====== 1ST ITERATION ======
mvasilkov / load.js
Created Aug 28, 2014
Image loader for canvas, suitable for JS13K
View load.js
function load(images, done) {
var toLoad = images.length
var res = Array(toLoad)
var loaded = 0
images.forEach(function (url, i) {
var image = new Image
image.onload = function () {
res[i] = this
if (++loaded == toLoad)
You can’t perform that action at this time.