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
@gmccreight
gmccreight / master.vim
Last active Oct 27, 2019
A script that gives you a playground for mastering vim
View master.vim
" copy all this into a vim buffer, save it, then...
" source the file by typing :so %
" Now the vim buffer acts like a specialized application for mastering vim
" There are two queues, Study and Known. Depending how confident you feel
" about the item you are currently learning, you can move it down several
" positions, all the way to the end of the Study queue, or to the Known
" queue.
" type ,, (that's comma comma)
@dweekly
dweekly / gist:5873953
Last active Dec 19, 2015
Get Emscripten Running on OS X 10.8
View gist:5873953
# Based on https://github.com/kripken/emscripten/wiki/Tutorial
# prerequisites
cd ~/
brew install node
sudo ln -s /usr/bin/python2.7 /usr/bin/python2
curl http://llvm.org/releases/3.2/clang+llvm-3.2-x86_64-apple-darwin11.tar.gz > llvm.tgz
tar xzvf llvm.tgz
ln -s clang+llvm-3.2-x86_64-apple-darwin11 llvm
@CamDavidsonPilon
CamDavidsonPilon / snapple.py
Last active Dec 16, 2015
using data from https://gist.github.com/shanselman/5422230 as `filename`, will create a random comment.
View snapple.py
import re
import random
CURLY_RE = re.compile( "\{(.*?)\}" )
def spam( filename ):
file = open(filename, "r")
View image.py
# -*- coding: utf-8 -*-
from PIL import Image, ImageMath
def paste_composite(original, paste):
"""
Вставляет в первое изображение второе, с учетом альфаканала обоих.
Оба изображения должны быть в формате RGBA.
"""
@adeelejaz
adeelejaz / jquery.browser.js
Last active Jan 9, 2018
jQuery $.browser as a separate file in case you do not want to include the full migration file
View jquery.browser.js
(function( jQuery, window, undefined ) {
"use strict";
var matched, browser;
jQuery.uaMatch = function( ua ) {
ua = ua.toLowerCase();
var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) ||
/(webkit)[ \/]([\w.]+)/.exec( ua ) ||
@rkfg
rkfg / gifcreate
Last active Oct 19, 2018
GIF animation script to cut a piece of video and produce a frame-accurate optimized GIF with a precise framerate.
View gifcreate
#!/bin/sh
help () {
log "Usage: `basename $0` [-h] [-n] [-a] [-u] [-s hh:mm:ss] [-d ss] [-w px] [-f n] [-S n] [-b n] [-t subtitle.sub] [-c default | basic | fontsize | fontstyle | full] <filename> [result.gif]
-h show this help
-n turn off subtitles
-a don't open directory with frames in filemanager
-u update this script from gist. Create .gifupd file in the script's directory to automatically check for updates once per day or put the number of seconds in the file to check with that period.
-s start time in seconds or as hours:minutes:seconds, default: 0
@martinsik
martinsik / libwebsockets-webserver.c
Created Jul 31, 2012
Simple webserver based on libwebsockets library. Read full description at http://martinsikora.com/libwebsockets-simple-http-server
View libwebsockets-webserver.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <libwebsockets.h>
static int callback_http(struct libwebsocket_context *context,
struct libwebsocket *wsi,
enum libwebsocket_callback_reasons reason, void *user,
@bradfitz
bradfitz / blast.pl
Created Apr 16, 2012
Cognac Hacking
View blast.pl
#!/usr/bin/perl
use strict;
my $rockettop = <<'END';
.
/ \
/ \
END
View gist:2317969
import inspect
def marmoset_patch(func, s, r):
source = inspect.getsource(func).replace(s, r)
exec source in func.func_globals
func.func_code = func.func_globals[func.__name__].func_code
def foo():
print 1
print 2
@erikh
erikh / hack.sh
Created Mar 31, 2012 — forked from DAddYE/hack.sh
OSX For Hackers
View hack.sh
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
You can’t perform that action at this time.