Skip to content

Instantly share code, notes, and snippets.

View vancura's full-sized avatar
🤓
Kuju pixle!

Václav Vančura vancura

🤓
Kuju pixle!
View GitHub Profile
@vancura
vancura / typo.rb
Created October 5, 2010 14:19 — forked from tomasc/typo.rb
Typographic conversion regexps
def three_periods_to_ellipsis
self.gsub("...", "…")
end
def straight_double_quotes_to_smart_double_quotes
self.gsub(/\B"\b([^"“”„‟″‶\r\n]+)\b"\B/, '“\1”')
end
def straight_single_quotes_to_smart_single_quotes
self.gsub(/\B'\b([^'‘’‚‛′‵\r\n]+)\b'\B/, '‘\1’')
@vancura
vancura / czech.txt
Created May 16, 2011 08:16
Czech unicode range
U+00C1,U+00C9,U+00CD,U+00D3,U+00DA,U+00DD,U+00E1,U+00E9,U+00ED,U+00F3,U+00FA,U+00FD,U+010C,U+010D,U+010E,U+010F,U+011A,U+011B,U+0147,U+0148,U+0158,U+0159,U+0160,U+0161,U+0164,U+0165,U+016E,U+016F,U+017D,U+017E
@vancura
vancura / spanish.txt
Created May 16, 2011 08:20
Spanish unicode range
U+0193,U+00E1,U+00C9,U+00E9,U+00CD,U+00ED,U+00D1,U+00F1,U+00D3,U+00F3,U+00DA,U+00FA,U+00DC,U+00FC,U+00AB,U+00BB,U+00BF,U+00A1,U+20A7
@vancura
vancura / DmncGenerator.as
Created September 7, 2011 13:04
DMNC Generator (AS2)
//
// org.vancura.util.DmncGenerator
//
// Created by Václav Vančura on 2007-08-19.
// Copyleft (cc) 2007 Václav Vančura (www.Vaclav.Vancura.org). All rights reserved.
//
import com.gnarlysurf.LoremIpsum;
@vancura
vancura / DMNCGeneratorTest.as
Created September 7, 2011 13:23
DMNC Generator test (try with http://metal.hurlant.com/as2/)
class Test {
public var vocabulary:String = 'a,a,a,a,a,a,a,i,i,i,i,i,i,to,to,to,to,' +
'je prekérka,ta rozkošnůstka,na browsdadlo,u poče,ten moňák,do baziše,vyjemnit,vymazlit,' +
'poblijón,málomoc,nejvíc,skoro,lábuž,řácky,bez fiží,bižu,ten bachor,máš pazdrát,vořešprut,vošťůrák,je hejtypocem,je podržtaška,' +
'čupr supr,trupr,mega,můj ty janku na stojánku,kryndypindy,kakraholte,jémináčku,potěškoště,dám si šlofík,čunín,hele,hele,tohle,' +
'tamto,toto,šlejška,šlaušek,má živůtek,na negližé,ta halenka,nemá škapulíř,ale,protože,rozhodně,málo,tam,kožnatý,božínku,' +
'techtle mechtle,čupr,pirošuk,mičuda,máš čůčo,s klky,bohovský,žok,župánek,cicmat a,cucflek,do cancáku,jářku,s šošolí,' +
@vancura
vancura / less-watcher.rb
Created November 1, 2011 09:41
Folder watcher (replace "less-compile.sh" with your own command)
#!/usr/bin/env ruby
# watch.rb by Brett Terpstra, 2011 <http://brettterpstra.com>
# with credit to Carlo Zottmann <https://github.com/carlo/haml-sass-file-watcher>
# original by Brett Terpstra <http://brettterpstra.com/watch-for-file-changes-and-refresh-your-browser-automatically/>
# fork by Vaclav Vancura / SAY Media <http://saymedia.com>
trap("SIGINT") { exit }
filetypes = ['less']
watch_folder = 'content/media/less'
@vancura
vancura / revert-ipa-pngs.sh
Created March 18, 2012 18:32
Revert IPA PNGs
for f in "$@"
do
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/pngcrush -e _fixed.png -revert-iphone-optimizations "$f"
done
@vancura
vancura / variscroll-howto.md
Created September 5, 2012 18:18
VariScroll HOW-TO

Just for your information: our new VariScroll engine runs in two modes: automatic or manual:

  • automatic mode: you choose an element to apply VariScroll to, and this element becomes variscrolled. VariScroll itself wraps the element into another div. So if you have something like this: div.myscroll, it becomes: div.variscroll-container > div.myscroll. The old div.myscroll is wrapped into newly created div.variscroll-container. This is needed so the engine works. FYI everything can be undone using the destroy() method.
  • manual mode: you need to create the wrapping divs prior to calling VariScroll, and you send these elements selectors to the engine. This had to be done so the SAY ads could be loaded (they're nasty). Let me show on the Phoenix demo I am working on:
<div id="variscroll">
    <div id="variscroll-roller">
        <div class="unit first">Advertisement</div>
@vancura
vancura / background-clip:-text-detection.markdown
Created October 8, 2013 09:21
A Pen by Václav Vančura.

Keybase proof

I hereby claim:

  • I am vancura on github.
  • I am vancura (https://keybase.io/vancura) on keybase.
  • I have a public key whose fingerprint is 9EFF C6EE 57AB 1625 AAA5 2145 BC60 963F E661 20D0

To claim this, I am signing this object: