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
// With jQuery and data tag driven templating, wrap text with a tag to highlight the text | |
// such that this works: | |
// | |
// <p data-js-highlight-text="hello,"> | |
// <span style="color: #009fff">Hello,</span> World | |
// </p> | |
// | |
// Extended examples with data attributes in your html: | |
// | |
// Set the data-js-highlight-text attribute. Before: |
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
current_hour=${CURRENT_HOUR:-$(date "+%k")} | |
# I have no idea how to get the actual list of colors but this has some colors in the screenshot | |
# https://gabri.me/blog/custom-colors-in-your-zsh-prompt | |
# Set the color value | |
work_color=154 | |
keep_going_color=157 | |
wrap_up_color=34 |
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
on("mouseleave", function () { | |
var _this = this; | |
var some_function = function() { | |
setTimeout(function () { | |
if (!$(".popover:hover").length) { | |
$(_this).popover("hide") | |
} else { | |
some_function(); | |
} | |
}, 50); |
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
require 'rspec/core' | |
class TestA | |
def foo | |
true | |
end | |
def bar | |
true | |
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
mark@Marks-MacBook-Air ~/rubyapps/blag (master)$ bundle outdated | |
Fetching gem metadata from https://rubygems.org/........ | |
Fetching gem metadata from https://rubygems.org/.. | |
Resolving dependencies... | |
Outdated gems included in the bundle: | |
* directory_watcher (1.5.1 > 1.4.1) | |
* safe_yaml (0.9.1 > 0.7.1) # <- not quite what I want | |
mark@Marks-MacBook-Air ~/rubyapps/blag (master)$ cat Gemfile.lock | grep -i safe_yaml |
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
2013-05-18T19:38:19.642887+00:00 heroku[web.1]: State changed from down to starting | |
2013-05-18T19:38:19.642887+00:00 heroku[web.1]: Unidling | |
2013-05-18T19:38:20.473508+00:00 heroku[web.1]: Starting process with command `bundle exec jekyll serve -p 23794` | |
2013-05-18T19:38:22.046826+00:00 app[web.1]: Source: /app | |
2013-05 | |
-18T19:38:22.046657+00:00 app[web.1]: Configuration file: /app/_config.yml | |
2013-05-18T19:38:22.046826+00:00 app[web.1]: Destination: /app/_site | |
2013-05-18T19:38:22.457840+00:00 app[web.1]: Generating... done. | |
2013-05-18T19:38:22.535753+00:00 app[web.1]: [2013-05-18 19:38:22] INFO WEBrick 1.3.1 | |
2013-05-18T19:38:22.535753+00:00 app[web.1]: [2013-05-18 19:38:22] INFO ruby 1.9.2 (2011-07-09) [x86_64-linux] |
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 | |
line_count=0 | |
text_to_send="" | |
number_of_lines_to_send_at_a_time=5 | |
logfile="irclogs/freenode/#skullspace.log" | |
mailing_to="discuss@lists.skullspace.ca" | |
tail -f -n 0 $logfile | \ | |
while read line |
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
> Time.use_zone("Pacific Time (US & Canada)") { puts Date.today; puts Time.now.to_date } | |
2012-08-28 | |
2012-08-28 | |
=> nil | |
> Time.use_zone("Pacific Time (US & Canada)") { puts Date.today; puts Time.zone.now.to_date } | |
2012-08-28 | |
2012-08-27 | |
=> nil |
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
# 10 seconds | |
TICK = 1 | |
TICKS_PER_MINUTE = 6 | |
# 25 minutes | |
total_time = 25 * TICKS_PER_MINUTE | |
puts "Begin pomodoro!" |
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
class Test::Unit::Failure | |
@@failure_count = -1 | |
def single_character_display | |
@@failure_count = @@failure_count + 1 | |
case @@failure_count % 4 | |
when 0 | |
'F' | |
when 1 |
NewerOlder