Skip to content

Instantly share code, notes, and snippets.

View aripalo's full-sized avatar

Ari Palo aripalo

View GitHub Profile
@aripalo
aripalo / README.md
Created March 21, 2012 13:49 — forked from necolas/README.md
Experimenting with component-based HTML/CSS naming and patterns

Template Components

Used to provide structural templates.

Pattern

t-template-name
t-template-name--modifier-name
t-template-name__subcomponent-name--subcomponent-modifier-name
@aripalo
aripalo / anchorinclude.js
Created March 30, 2012 15:59 — forked from scottjehl/anchorinclude.js
Anchor-include Pattern
/*
* anchor-include pattern for already-functional links that work as a client-side include
* Copyright 2011, Scott Jehl, scottjehl.com
* Dual licensed under the MIT
* Idea from Scott Gonzalez
* to use, place attributes on an already-functional anchor pointing to content
* that should either replace, or insert before or after that anchor
* after the page has loaded
* Replace: <a href="..." data-replace="articles/latest/fragment">Latest Articles</a>
* Before: <a href="..." data-before="articles/latest/fragment">Latest Articles</a>
@aripalo
aripalo / apple-shadow.css
Created May 18, 2012 10:42 — forked from nrrrdcore/apple-shadow.css
Bending Shadows Backwards: Apple.com's Container CSS Sorcery
.shadow-stuff {
-moz-border-radius: 0% 0% 100% 100% / 0% 0% 8px 8px;
-webkit-border-radius: 0% 0% 100% 100% / 0% 0% 8px 8px;
border-radius: 0% 0% 100% 100% / 0% 0% 8px 8px;
-moz-box-shadow: rgba(0,0,0,.30) 0 2px 3px;
-webkit-box-shadow: rgba(0,0,0,.30) 0 2px 3px;
box-shadow: rgba(0,0,0,.30) 0 2px 3px;
}
.container {
@aripalo
aripalo / bended-shadow.css
Created May 18, 2012 10:42 — forked from nrrrdcore/bending-shadow.css
Simple Bended-Shadow CSS: Create the Bended Photo Effect without writing a million divs.
.bended-shadow {
position: relative;
width: 500px;
margin: 200px auto;
}
.bended-shadow::before, .bended-shadow::after {
content: '';
position: absolute;
width: 60%;
Mon Aug 19 16:24:38 +0300 2013 Puppet (err): Unable to set ownership of log file
Mon Aug 19 16:24:43 +0300 2013 /Stage[main]/Boxen::Config/File[/opt/boxen]/owner (notice): owner changed '400706' to '400706'
Mon Aug 19 16:24:43 +0300 2013 /Stage[main]/Boxen::Config/File[/opt/boxen/bin]/ensure (notice): created
Mon Aug 19 16:24:43 +0300 2013 /Stage[main]/Boxen::Config/File[/opt/boxen/config]/owner (notice): owner changed '400706' to '400706'
Mon Aug 19 16:24:43 +0300 2013 /Stage[main]/Boxen::Config/File[/opt/boxen/data]/ensure (notice): created
Mon Aug 19 16:24:43 +0300 2013 /Stage[main]/Boxen::Config/File[/opt/boxen/data/project-sockets]/ensure (notice): created
Mon Aug 19 16:24:43 +0300 2013 /Stage[main]/Boxen::Config/File[/opt/boxen/data/puppet]/ensure (notice): created
Mon Aug 19 16:24:43 +0300 2013 /Stage[main]/Boxen::Config/File[/opt/boxen/log]/ensure (notice): created
Mon Aug 19 16:24:43 +0300 2013 /Stage[main]/Boxen::Config/File[/opt/boxen/env.d]/ensure (notice): created
Mon Aug 19 16:24:43 +0300 2013 /
@aripalo
aripalo / convert.rb
Created August 13, 2014 14:04
Converting HTML with UTF-8 encoding to ISO-8859-1
File.open("output.html", 'w') { |file| file.write(File.read(ARGV[0]).encode(Encoding::ISO_8859_1)) }
@aripalo
aripalo / README.md
Last active August 29, 2015 14:05
Remap Mac OS X Caps Lock key as ⌘ + ←

Remap OS X Caps Lock key as ⌘ + ←

Changes Caps Lock key behaviour to move cursor to beginning of current text line, e.g. the same as +

Follows the tutorial from: http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/

  1. Download & install Seil - formerly known as PCKeyboardHack
  2. Download & install Karabiner - formerly known as KeyRemap4MacBook
  3. In Seil set Change Caps Lock to keycode 80 (F19)
@aripalo
aripalo / old-angular2-syntax-example.html
Last active August 29, 2015 14:16
Angular 2.x template syntax as revealed on October 28th 2014 at http://jaxenter.com/angular-2-0-112094.html
<!-- as seen October 28th 2014 on http://jaxenter.com/angular-2-0-112094.html -->
<div>
<input type="text" [value]="newTodoTitle">
<button (click)="addTodo()">+</button>
<tab-container>
<tab-pane title="Good kids">
<div [ng-repeat|todo]="todosOf('good')">
<input type="checkbox" [checked]="todo.done">
{{todo.title}}
<button (click)="deleteTodo(todo)">X</button>
@aripalo
aripalo / reference-example.html
Last active August 29, 2015 14:16
Angular 2 reference syntax as seen on http://youtu.be/-dMBcqwvYA0?t=19m2s
<!-- Angular 2 reference syntax as seen on http://youtu.be/-dMBcqwvYA0?t=19m2s -->
<button (click)="input.focus()">foo</button>
<input #input type="text" name="user"/><!-- Note the attribute "#input" -->
@aripalo
aripalo / unneeded-directives-in-angular2
Last active August 29, 2015 14:16
Unneeded directives in Angular 2 as seen on http://youtu.be/-dMBcqwvYA0
# For properties as seen on http://youtu.be/-dMBcqwvYA0?t=13m42s
ng-bind ng-bind-html ng-bind-template
ng-class ng-class-even ng-class-odd
ng-style
ng-disabled ng-readonly ng-selected
ng-show ng-hide
ng-src ng-srcset ng-href
ng-value
# For events as seen on http://youtu.be/-dMBcqwvYA0?t=17m52s