Skip to content

Instantly share code, notes, and snippets.

View gists-app-test's full-sized avatar

gists-app-test

View GitHub Profile
@gists-app-test
gists-app-test / file001.txt
Created September 12, 2012 14:24
Gist 001
Sample gist 001. File 001. Line 001.
@gists-app-test
gists-app-test / file001.txt
Created September 12, 2012 14:25
Gist 002
Sample gist 002. File 001. Line 001.
-bash-4.1$ /qa/tools/opt/git-1.6.5/bin/git status
/qa/tools/opt/git-1.6.5/bin/git: error while loading shared libraries: libcrypto.so.4: cannot open shared object file: No such file or directory
-bash-4.1$ git status
git: error while loading shared libraries: libcrypto.so.4: cannot open shared object file: No such file or directory
@gists-app-test
gists-app-test / newerthan.sh
Created September 12, 2012 14:27 — forked from artyom/newerthan.sh
Check if file is newer than X minutes
#!/bin/sh -eu
usage () { printf "%s file [time-in-minutes]\n" ${0##*/} >&2 ; }
test $# -eq 0 && { usage ; exit 2 ; }
WHAT=$1
test -e $WHAT || { echo "$WHAT not found" >&2 ; exit 2 ; }
MINUTES=${2:-30}
case ${0##*/} in
older*)
test $(($(date +%s)-$(stat --printf "%Y\n" "$WHAT"))) -gt $(($MINUTES*60))
@gists-app-test
gists-app-test / 1.dup
Created September 12, 2012 14:27
identifiers
13822
17471
15871
18655
18219
18574
14647
13800
17967
15620
def positive_number(value):
if value <= 0.0:
raise ValidationError('%s is not greater than 0' % value)
@gists-app-test
gists-app-test / Cool Text.css
Created September 12, 2012 14:28 — forked from DeadlyBrad42/CoolText.css
Some of the coolest text styles that I've stolen from around the Internet.
.1
{
color: #222222;
text-decoration: none;
text-shadow: 1px 1px 0 #DDDDDD, 2px 2px 0 #BBBBBB;
}
.2.3d
{
color:rgba(0,255,255,0.5);
module SpecHelpers
def setup_memory_db
databases_config = YAML.load_file(File.expand_path('../../config/database.yml', __FILE__))
connection = ActiveRecord::Base.establish_connection(databases_config['memory'])
load File.expand_path('../../db/schema.rb', __FILE__)
DatabaseCleaner[:active_record, :connection => connection]
DatabaseCleaner.strategy = :deletion
DatabaseCleaner.clean_with(:truncation)
DatabaseCleaner.start
@gists-app-test
gists-app-test / jquery.h5Accordion.a11y.example.html
Created September 12, 2012 14:28
h5Accordion: Accessible accordion script
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>JQuery h5Accordion example</title>
</head>
<body>
<h1>JQuery h5Accordion example</h1>
<div class="accordion" data-accordiontxt='{"open":"Afficher le contenu","close":"Masquer le contenu"}'>
@gists-app-test
gists-app-test / eventListener.js
Created September 12, 2012 14:28 — forked from asimpson/eventListener.js
eventListener IE8 and below
/* window.addEventListener( "resize", mmListener);
mmListener();*/
if (window.addEventListener) {
window.addEventListener("resize", mmListener);
} else if (window.attachEvent) {
window.attachEvent("resize", mmListener);
}
mmListener();