Skip to content

Instantly share code, notes, and snippets.

View heracek's full-sized avatar

Tomáš Horáček heracek

View GitHub Profile
@heracek
heracek / keybase.md
Created March 14, 2017 10:30
keybase.md

Keybase proof

I hereby claim:

  • I am heracek on github.
  • I am heracek (https://keybase.io/heracek) on keybase.
  • I have a public key ASBoqZfwTolpr6r17TryznpbF4pBSmSw9yQTKPn7bKPHYQo

To claim this, I am signing this object:

@heracek
heracek / README.md
Created October 16, 2015 14:24 — forked from JoelQ/README.md
Using Shell Scripts for a Better User Experience (source for https://robots.thoughtbot.com/improving-user-experience-with-shell-scripts)

Server scripts

This is the source for the scripts discussed in https://robots.thoughtbot.com/improving-user-experience-with-shell-scripts

Both scripts are in the bin/ directory of the repo that contains all the markdown documents for blog posts. Users run bin/server and everything is automatically set up for them to view a local preview of the blog. bin/server-setup is a dependency of bin/server and is never run directly by users.

Maitre-d is the name of the "blog engine" discussed in the article.

@heracek
heracek / ubuntu.yml
Last active August 29, 2015 14:23 — forked from jameskyle/ubuntu.yml
- name: Set the Hostname
hostname: name=ubuntu
- name: upgrade packages
apt: upgrade=full
- name: install packages
apt: >
name="{{ item }}"
state=latest
with_items:
- git
@heracek
heracek / gist:fbf63f71e22e2ee32f2a
Last active August 29, 2015 14:22 — forked from steida/gist:d54a2cd2296ec7c164d1
React.js field validation
/*
Simple serial "one by one" sync/async promises based validation.
*/
import validator from 'validator'
import Promise from 'bluebird'
export function focusInvalidField(reactComponent) {
return (error) => {
if (error instanceof ValidationError) {
if (!error.prop) return
@heracek
heracek / index.html
Created October 8, 2014 12:24
Show/Hide for AsciiDoctor checklists in pure JS and CSS // source http://jsbin.com/situqe/2
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Show/Hide for AsciiDoctor checklists in pure JS and CSS" />
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
.hide-me > ul > li:nth-child(n + 2),
.hide-me > ul > li:first-child > .checklist {
display: none;
@heracek
heracek / padrino-sprocktes-compass.rb
Last active August 29, 2015 14:04
Padrino generators
###
# Template for generate clean sample app at Padrino(Compass, SASS, Slim, Asset pipelines, CoffeeScript, etc…) & Angular
# @requirements
# => Bundler, Padrino-gen, npm, bower
# @uses
# =>
# padrino-gen project testapp --template padrino-sprocktes-compass.rb
# bundle exec padrino rake -e production assets:precompile
# bundle exec padrino start -e production
@heracek
heracek / _language_links.slim
Created June 5, 2014 11:17
Padrino switching multiple-laguages for same page
@heracek
heracek / link-staging-files-to-src.sh
Created December 12, 2013 19:27
## Skripty jsou ulozeny v `bin/link-staging-files-to-src.sh` a `bin/work-on-location.sh`
@heracek
heracek / 0_reuse_code.js
Created October 11, 2013 14:04
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
* { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; }
.container {
font-family: "helvetica neue", helvetica, sans-serif;
font-weight: 200;
font-size: 30px;
top: 40px;
height: 300px;
width: 400px;
margin-top: 50px;