Skip to content

Instantly share code, notes, and snippets.

View robinpokorny's full-sized avatar

Robin Pokorny robinpokorny

View GitHub Profile
@robinpokorny
robinpokorny / exotic_but_valid.xml
Created February 26, 2012 21:47
Valid XML with exotic characters
<?xml version="1.05" encoding="UTF-8"?>
<!-- With version 1.05 this should be processed as XML 1.0 -->
<exotic>
<!--
"‍" Zero Width Joiner &#x200d;
"‌" Zero Width Non-Joiner &#x200c;
Note that a valid tag may not start with a number or be empty. Both of the following tags are still valid - there is a non-printable character on the first position.
-->
#1 Prepare your toolshed
npm install -g less
mkdir less/
#2+3 Rename and compile
for f in css/*.css; do b=$(basename $f .css); mv css/$b.css less/$b.less; lessc less/$b.less css/$b.css; done
#4 Enjoy and gain credibility
git add && git commit -m "Switch CSS to LESS in whole project #time 3m"
# Create a folder
# Yeoman will use its name as your project's name
mkdir myapp && cd myapp
# Install the generator
npm install generator-lessapp
# Run Yeoman and follow the instructions
yo lessapp
# Install dependencies
npm install && bower install
# Develop the next big thing
@robinpokorny
robinpokorny / Gruntfile.js
Last active December 21, 2015 00:39
grunt-legacssy demo
grunt.loadNpmTasks('grunt-legacssy');
grunt.initConfig({
legacssy: {
files: {
'css/style-legacy.css': 'css/style.css',
},
},
})
@robinpokorny
robinpokorny / extend.css
Created January 22, 2014 19:15
"Silent" classes in LESS
foo,
bar {
background-color: #e0e0e0;
}
foo {
color: blue;
}
bar {
color: green;
}
@robinpokorny
robinpokorny / style.css
Created April 24, 2014 14:57
CSS challenge
w v u t s r
q p o n m l
k j i h g f
d c b a {
color: black
}
.foo .bar a {
color: white;
}
@robinpokorny
robinpokorny / serendibite.html
Created October 13, 2014 09:02
Serendibite grid – syntax prototype
<div class="#">
<div class="[ 1/2 3/4@md 5/12@lg 2_@lg ]">
</div>
<div class="[ 1/2 1/4@md 5/12@lg ]">
</div>
</div>
@robinpokorny
robinpokorny / .bowerrc
Last active August 29, 2015 14:07
Ukázka zápisů balíčků v Bower
{
"directory": "lib/components"
}
var pokemons = [
{
"name": "rattata",
"resource_uri": "api/v1/pokemon/19/"
},
{
"name": "charmander",
"resource_uri": "api/v1/pokemon/4/"
},
{
@robinpokorny
robinpokorny / 1-info.md
Last active September 4, 2022 17:27
📰 Dead simple tweetable JavaScript PubSub pattern module using Set (ES2015)