Skip to content

Instantly share code, notes, and snippets.

View bigos's full-sized avatar

Jacek Podkanski bigos

  • North West England
View GitHub Profile
@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')
@JonCrawford
JonCrawford / product_showcase.css
Created June 27, 2011 01:26
Storenvy Product Showcase Slider - This code is provided as-is and is not supported by Storenvy.
/* Add this CSS to your store Styles section under CSS mode */
/* http://www.storenvy.com/ */
/* Photo Slider */
.product_photo_slider {
background: #fff; /*: Product Slider Background :*/
border: 5px solid #eaeaea; /*: Product Slider Border :*/
color: #555; /*: Product Slider Product Description :*/
display: block;
margin-left:8px;
@sebfisch
sebfisch / gist:2235780
Created March 29, 2012 10:47
Laymans explanation of delimited continuations with examples of using them for exception handling and nondeterministic programming.

Delimited Continuations

Delimited continuations manipulate the control flow of programs. Similar to control structures like conditionals or loops they allow to deviate from a sequential flow of control.

We use exception handling as another example for control flow manipulation and later show how to implement it using delimited continuations. Finally, we show that nondeterminism can also be expressed using delimited continuations.

Exception Handling

@JEG2
JEG2 / ruby_nuby_videos.md
Created November 1, 2012 13:57
All of the videos created for the Ruby Nuby Project of the Ruby Rogues podcast.
@ober
ober / gist:5094469
Last active February 9, 2016 01:26
Building Guile Emacs on Ubuntu.
# Checkout latest guile-emacs
#git clone git://git.hcoop.net/git/bpt/emacs.git
# apply the patch to get it to compile with latest guile.
cat <<EOF>>/tmp/gemacs.diff
"diff --git a/src/lisp.h b/src/lisp.h
index a907105..5ec9644 100644
--- a/src/lisp.h

Ubuntu 12.04, Ruby, Rails, Nginx, Unicorn and git-deploy

In the seemlingly endless search for the actual correct and easy way to deploy a Rails app, we have tried several ways. We tried out using Apache2 and running a cluster of Thin servers. With the built in threading of Puma we decided to use it with Nginx.

Server Setup

  • Create new server
  • Login to new server
    • ssh username@IPaddress (you can also use the domain name if you have the DNS setup already)
    • accept the RSA key
@geoffgarside
geoffgarside / rails4-template.rb
Last active June 26, 2022 21:27
Rails 4 Application Template
# Rails 4 Application Template
# Remove normal files we don't want
remove_file "README.rdoc"
remove_file "public/index.html"
remove_file "app/assets/images/rails.png"
# Copy database.yml and secrets.yml to sample
inside "config" do
run "cp database.yml database.yml.sample"
run "cp secrets.yml secrets.yml.sample"

Books

Algorithms and Data Structures

The Art of Computer Programming (Knuth)

Programming Pearls (Bentley)

Data Structures and Algorithms (Aho, Hopcroft, Ullman)

@chaitanyagupta
chaitanyagupta / _reader-macros.md
Last active September 12, 2024 16:16
Reader Macros in Common Lisp

Reader Macros in Common Lisp

This post also appears on lisper.in.

Reader macros are perhaps not as famous as ordinary macros. While macros are a great way to create your own DSL, reader macros provide even greater flexibility by allowing you to create entirely new syntax on top of Lisp.

Paul Graham explains them very well in [On Lisp][] (Chapter 17, Read-Macros):

The three big moments in a Lisp expression's life are read-time, compile-time, and runtime. Functions are in control at runtime. Macros give us a chance to perform transformations on programs at compile-time. ...read-macros... do their work at read-time.

@favadi
favadi / build-emacs.sh
Last active June 5, 2021 15:25
Compile latest emacs version (24.5) in Ubuntu 14.04
#!/bin/bash
# Build latest version of Emacs, version management with stow
# OS: Ubuntu 14.04 LTS
# version: 24.5
# Toolkit: lucid
# Warning, use updated version of this script in: https://github.com/favadi/build-emacs
set -e