Skip to content

Instantly share code, notes, and snippets.

@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@adamvr
adamvr / extract-uimage.sh
Created July 13, 2011 05:20
Script for extracting a uimage
#!/bin/sh
#
# Copyright (C) 2010 Matthias Buecher (http://www.maddes.net/)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# http://www.gnu.org/licenses/gpl-2.0.txt
@lancejpollard
lancejpollard / meta-tags.md
Created March 5, 2012 13:54
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@kevinSuttle
kevinSuttle / meta-tags.md
Last active May 12, 2024 15:28 — forked from lancejpollard/meta-tags.md
List of Usable HTML Meta and Link Tags
@tdreyno
tdreyno / sprite_sheet.css
Created March 8, 2012 17:44
60 fps CSS Animation
@keyframes animate-particle {
0% {
background-position: 0 0px; }
1.695% {
background-position: 0 -124px; }
3.39% {
background-position: 0 -248px; }
@mikehaertl
mikehaertl / gist:3258427
Created August 4, 2012 15:40
Learn you a Haskell - In a nutshell

Learn you a Haskell - In a nutshell

This is a summary of the "Learn You A Haskell" online book under http://learnyouahaskell.com/chapters.


1. Introduction

  • Haskell is a functional programming language.
@xandkar
xandkar / concurrent_port_scanner.hs
Created October 20, 2012 05:00
Concurrent port scanner in Haskell
-- http://blog.moertel.com/articles/2004/03/13/concurrent-port-scanner-in-haskell
module Main (main) where
import Control.Concurrent
import Control.Exception
import Data.Maybe
import Network
import Network.BSD
import System.Environment
@Warry
Warry / Article.md
Created December 11, 2012 00:11
How to make faster scroll effects?

How to make faster scroll effects?

  • Avoid too many reflows (the browser to recalculate everything)
  • Use advanced CSS3 for graphic card rendering
  • Precalculate sizes and positions

Beware of reflows

The reflow appens as many times as there are frames per seconds. It recalculate all positions that change in order to diplay them. Basically, when you scroll you execute a function where you move things between two reflows. But there are functions that triggers reflows such as jQuery offset, scroll... So there are two things to take care about when you dynamically change objects in javascript to avoid too many reflows:

@mattetti
mattetti / multipart_upload.go
Last active April 22, 2024 05:24
Example of doing a multipart upload in Go (golang)
package main
import (
"bytes"
"fmt"
"io"
"log"
"mime/multipart"
"net/http"
"os"
@folone
folone / gist:6089236
Last active October 10, 2020 18:26
Table of unicode operators in scalaz 6.0.x