Skip to content

Instantly share code, notes, and snippets.

View skammer's full-sized avatar
🐱
may or may not be a cat

Max Vasiliev skammer

🐱
may or may not be a cat
View GitHub Profile
@skammer
skammer / market.android.com.js
Created April 27, 2011 20:50
Add QR Codes to Android Market
// Add handy QR Codes to Android Market.
// For ~/.js
var url = encodeURIComponent(window.location.href);
var title = $("h1.doc-banner-title").text();
var dimentions = "276x276";
var request_url = "http://chart.apis.google.com/chart?cht=qr&chs="+
dimentions+
"&chl=MECARD%3AN%3A"+
inoremap <buffer> {<CR> {<CR>}<Esc>O
vnoremap <buffer> {<CR> S{<CR>}<Esc>Pk=iB
@skammer
skammer / Grooveshark.user.js
Created January 24, 2011 14:07
И ваш грувшарк будет мягким и шелковистым.
var main = document.getElementById("mainContainer");
var capital = document.getElementById("capital");
var capitalPane = document.getElementById("capitalPane");
var application = document.getElementById("application")
var removeAds = function() {
application.style.marginRight = "0";
capital.style.display = "none";
" Toggles fullscreen for current window.
" Works exclusively on macvim http://code.google.com/p/macvim/
fu! ToggleFullscreen()
if &go == "amge"
exec 'set go='."amg"
let g:old_lines=&lines
let g:old_columns=&columns
set lines=9999
set columns=9999
" Simply swaps lines up and down. No rocket science here.
function! s:swap_lines( n1, n2 )
let line1 = getline( a:n1 )
let line2 = getline( a:n2 )
call setline( a:n1, line2 )
call setline( a:n2, line1 )
endfunction
function! s:swap_up()
require 'rubygems'
require 'sinatra'
require 'datamapper'
require 'dm-paperclip'
require 'haml'
require 'fileutils'
APP_ROOT = File.expand_path(File.dirname(__FILE__))
DataMapper::setup(:default, "sqlite3://#{APP_ROOT}/db.sqlite3")
@skammer
skammer / license
Created January 28, 2010 02:04 — forked from defunkt/license
#!/bin/sh -e
# Usage: license
# Prints an MIT license appropriate for totin' around.
#
# $ license > COPYING
#!/bin/sh
echo "Copyright (c) `date +%Y` Chris Wanstrath
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
object ToRome {
sealed class RomeDigit(val value: Int)
case object I extends RomeDigit(1)
case object V extends RomeDigit(5)
case object X extends RomeDigit(10)
case object L extends RomeDigit(50)
case object C extends RomeDigit(100)
case object D extends RomeDigit(500)
ruby -e "require 'webrick';s=WEBrick::HTTPServer.new :Port=>3001,:DocumentRoot=>Dir.pwd;trap('INT'){s.shutdown};s.start"