- Twitter: @polarblau
- Website or Blog: http://polarblau.com
- Company: Siili Solutions http://siili.fi
function gfix { | |
DEFAULT_MESSAGE=$(git log -1 HEAD --pretty-format:%s) | |
MESSAGE=${1:-$DEFAULT_MESSAGE} | |
git commit --amend -m "$MESSAGE" | |
} |
// Depends on bourbon/neat for the +media mixin | |
// Swap for you own implementation as needed | |
=media-and-ie($query, $total-columns: $grid-columns, $ies: (7, 8)) | |
$ie-selectors: () | |
+media($query, $total-columns) | |
@content | |
@each $ie in $ies | |
$ie-selectors: append($ie-selectors, unquote('html.lt-ie#{$ie + 1} &'), comma) | |
#{$ie-selectors} |
By Inge Geerdens, originally published on LinkedIn (https://www.linkedin.com/today/post/article/20140423114614-44558-shades-of-grey)
The other day, I had to let go of an employee. Not because he was performing poorly, but simply because our business had changed completely over the past few years (I sold one company) and we didn't have any new projects fitting his profile nor preferences. It wasn't a decision I made overnight. It wasn't even my decision. We talked about it on several occasions. And eventually we agreed to terminate our collaboration as soon as he would have found a new challenge. It felt like the right thing to do after having worked together for so many years. And I was convinced he would find that new challenge soon enough. I was happy we would be able to go our separate ways in good order and hoped he would find a new position where his competencies would be more valued.
Fast forward. We're now just a few weeks later, outside office hours. I'm still on the job though, together with anothe
function _git_prompt() { | |
local git_status="`git status -unormal 2>&1`" | |
if ! [[ "$git_status" =~ Not\ a\ git\ repo ]]; then | |
if [[ "$git_status" =~ nothing\ to\ commit ]]; then | |
local ansi=42 | |
elif [[ "$git_status" =~ nothing\ added\ to\ commit\ but\ untracked\ files\ present ]]; then | |
local ansi=43 | |
else | |
local ansi=45 | |
fi |
class APIProxy | |
def call(env) | |
request = Rack::Request.new(env) | |
api_url = request.params['api_url'] | |
[200, { 'Content-Type' => 'application/json' }, [get_json(api_url)]] | |
end | |
private |
RSpec::Matchers.define :be_json do | |
match do |actual| | |
begin | |
!!JSON.parse(actual) | |
rescue | |
false | |
end | |
end | |
failure_message_for_should do |actual| |
# USAGE: | |
# | |
# Mount endpoint, e.g.: | |
# | |
# map '/api_proxy' do | |
# run APIProxy.new | |
# end | |
# | |
# Then call the endpoint, passing the actual URL | |
# as GET param `api_url` |
function Bar() {} | |
Bar.prototype.foo = function () { | |
console.log('Bar#foo called'); | |
}; | |
Bar.prototype.bar = function (arg) { | |
console.log(this); | |
console.log('Bar#bar called with ' + arg); | |
}; |
.foo { | |
color: red; | |
} |