This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A thought on specs (no reality check has been done yet): | |
Specs in ruby are so nice that they may actually serve a formal basis for PM-R&D-QA communication. | |
One idea on one aspect along those lines follows. | |
Sometimes the specs are incomplete (putting it nicely), but sometimes they are inherently incomplete | |
(like missing required functionality description whatsoever) which is grave bad, and | |
sometimes a partial (wordy) description for a certain function is present – lacking a formal example. | |
I am dealing with the latter case of course, which may just be more than popular in UI-oriented apps. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ "`pwd`" != "$HOME" ] && [ -r .bashrc ] && . .bashrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Unfortunately, some tools, e.g. rvm (https://beginrescueend.com/), hook to cd, but not to pushd/popd. Not a problem! | |
pushd() { builtin pushd "$@" && cd .; } | |
popd() { builtin popd "$@" && cd .; } | |
pd() { | |
if [ "$#" -eq "0" ] | |
then if popd &> /dev/null && pwd > ~/.pd; then :; else pd "`cat ~/.pd`"; fi | |
else pushd "$1" &> /dev/null && pwd > ~/.pd | |
fi | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#lslD() { # It's like... ls -ld for all path elements | |
for node in "$@" | |
do [ "${node##/*}" ] && node="$PWD/$node" | |
while [[ "${node%/}" != "$node" || "${node##*/}" == "." ]] | |
do node="${node%/}" | |
node="${node%/.}" | |
done | |
while [ "$node" ] | |
do ls -ld "$node" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _timeBuffer = (function() { | |
var tos = {}; | |
return function(act, func, min, max) { | |
function _doFunc() { | |
var to = tos[act]; tos[act] = null; | |
if (to) { clearTimeout(to.max); clearTimeout(to.min); } | |
func(); | |
} | |
var to = tos[act]; | |
if (to) { clearTimeout(to.min) } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ENV['RUBY_DEBUG_PORT'] | |
Debugger.start_remote nil, ENV['RUBY_DEBUG_PORT'].to_i | |
else # optional | |
Debugger.start_remote | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* jQuery Mobile Framework 1.1.0 db342b1f315c282692791aa870455901fdb46a55 | |
* http://jquerymobile.com | |
* | |
* Copyright 2011 (c) jQuery Project | |
* Dual licensed under the MIT or GPL Version 2 licenses. | |
* http://jquery.org/license | |
* | |
*/ | |
/* Swatches */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* from https://developer.mozilla.org/media/uploads/demos/m/i/minase8888/2550eea731b01e0eb8f4997b1af4ef05/orientation-indicato_1327269188_demo_package/instructions.txt | |
/* LANDSCAPE CSS | |
#orientation-message | |
/* this is to hide the message from browsers that don't recognise orientation | |
display: none | |
@media screen and (orientation:portrait) | |
#orientation-message | |
/* this is the black base of the message itself, containing all other elements of the message |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def accessible_attributes(obj, role = :default) | |
HashWithIndifferentAccess.new(obj.attributes.slice(*obj.class.attr_accessible[role].to_a)) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rvm use `cat .ruby-version` | |
source .rvmenv |
OlderNewer