Skip to content

Instantly share code, notes, and snippets.

View danielres's full-sized avatar

Daniel Reszka danielres

  • Pixarea studio
  • Germany
View GitHub Profile
@danielres
danielres / es.sh
Last active December 15, 2015 01:49 — forked from sgringwe/es.sh
#cd ~
#sudo apt-get update
#sudo apt-get install openjdk-7-jre-headless -y
# Download the compiled elasticsearch rather than the source.
wget http://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.20.2.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
rm elasticsearch.tar.gz
sudo mv elasticsearch-* elasticsearch
sudo mv elasticsearch /usr/local/share
// ==UserScript==
// @name capybara serving assets
// @namespace http://studio.pixarea.com
// @description adds base tag to serve assets in pages generated by capybara's "save_and_open_page"
// @include file:///*/tmp/capybara/capybara-*.html
// @version 1
// @grant none
// ==/UserScript==
@danielres
danielres / watchr.rb
Last active December 12, 2015 03:38 — forked from mattsmith/watchr.rb
ENV["WATCHR"] = "1"
system 'clear'
puts 'watching ...'
def notify(message)
title = "Watchr Test Results"
message.gsub!("No DRb server is running. Running in local process instead ...", "")
puts message
is_passing = message.match(/\s0\s(errors|failures)/) ? true : false
@danielres
danielres / README.markdown
Created July 22, 2012 00:19
Using Font Awesome with Octopress
  1. Download Font Awesome (source)
  2. Take the file sass/font-awesome.sass and put it in your octopress sass folder
  3. Rename it to _font-awesome.sass
  4. Create a directory 'octpress/source/fonts' and put there the 4 font files (ttf, svg, eot and woff).
  5. In your stylesheet:
  • $fontAwesomePath: "fontawesome-webfont"
  • @import font-awesome

Done !

@danielres
danielres / 2012-07-21-post-with-images-from-flickr.markdown_
Created July 21, 2012 16:02
Fetching images from Flickr to show them in Octopress
---
layout: post
title: "Post with images from Flickr"
date: 2012-07-19 15:19
comments: true
categories: art
---
A big image:
@danielres
danielres / tarbackup.sh
Created July 14, 2012 00:31
backup script for my ALLDOC folder
#!/bin/sh
TODAY=`date --rfc-3339=date`
# TARBACKUP ALL EXCEPT DIR "GRAPHISME" ----------------------------------------
SOURCE="/media/files/ALLDOC/DANIEL"
EXCEPT="GRAPHISME"
TARGET="$TODAY"
mkdir -p "$TARGET"
@danielres
danielres / .livereload
Created July 12, 2012 21:46
Compass & livereload config files for rails 3.2
# Lines starting with pound sign (#) are ignored.
# additional extensions to monitor
config.exts << 'haml'
# exclude files with NAMES matching this mask
#config.exclusions << '~*'
# exclude files with PATHS matching this mask (if the mask contains a slash)
#config.exclusions << '/excluded_dir/*'
# exclude files with PATHS matching this REGEXP
@danielres
danielres / missing_translations.rb
Created June 1, 2012 12:25 — forked from oriolgual/missing_translations.rb
No more missing translations in Rails thanks to Cucumber!
# features/support/missing_translations.rb
missing_translations = []
After do |scenario|
temp = all('.translation_missing')
if temp.any?
missing_translations << temp.to_a
raise "Missing Translation"
end
@danielres
danielres / application.css
Created February 20, 2012 18:32
advanced compass usage with blueprint grid & scaffolding, and color theory
/* resulting css after compilation */
html {
margin: 0;
padding: 0;
border: 0; }
.bp-reset-element, body, h1, h2, h3, h4, h5, h6, article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary, blockquote, q, th, td, caption, table,
div, span, object, iframe, p,
pre, a, abbr, acronym, address,
@danielres
danielres / wider.htm
Created February 9, 2012 16:37
CSS: using negative margin to make elements wider than their outside block
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="generator" content="PSPad editor, www.pspad.com" />
<style type="text/css">
#wrapper {width:90%;}
#container {text-align:left; width:100%;}