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
cat file.csv | ruby -ne 'print if rand < 0.05' > random_lines.csv |
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
private | |
def generate_unique_id | |
self[self.class.primary_key] ||= ActiveSupport::SecureRandom.hex(5).downcase | |
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
# List all .rb file beginning with v1_ and change too bar_*.rb | |
ls v1_*.rb | awk '{print("mv "$1" "$1)}' | sed 's/v1_/bar_/2' | |
# The same as above, but commit the changes | |
ls v1_*.rb | awk '{print("mv "$1" "$1)}' | sed 's/v1_/bar_/2' | /bin/sh |
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 Cassandra | |
alias_method :old_insert, :insert | |
def insert(column_family, key, hash, options = {}) | |
CASSANDRAS_DIRTY_LAUNDRY << [column_family, key] | |
self.old_insert(column_family, key, hash, options) | |
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
... | |
silence_warnings do | |
BCrypt::Engine::DEFAULT_COST = BCrypt::Engine::MIN_COST | |
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
=begin | |
<px:categories> | |
<px:each> | |
<px:category> | |
<px:books> | |
<px:each> | |
<px:book> | |
--- Get stack suggestions at this level | |
=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
/* From http://stephen.io/mediaqueries/ */ | |
/* Non-retina iPad Landscape */ | |
@media only screen | |
and (min-device-width : 768px) | |
and (max-device-width : 1024px) | |
and (orientation : landscape) { | |
} |
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
{ | |
"vars": { | |
"@gray-darker": "lighten(#151D26, 13.5%)", | |
"@gray-dark": "lighten(#151D26, 20%)", | |
"@gray": "lighten(#151D26, 33.5%)", | |
"@gray-light": "lighten(#151D26, 46.7%)", | |
"@gray-lighter": "lighten(#151D26, 93.5%)", | |
"@brand-primary": "#685C79", | |
"@brand-success": "#5cb85c", | |
"@brand-info": "#FFBC67", |
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
// ViewController.swift | |
import UIKit | |
import WebKit | |
class ViewController: UIViewController, WKNavigationDelegate { | |
@IBOutlet var containerView: UIView! | |
var webView: WKWebView? | |
override func loadView() { |
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
Orders affected | |
FDD1-0HJ91G | |
FDD1-0Q8UYQ | |
FDD1-185UUN | |
FDD1-1QEFF5 | |
FDD1-25ZQ6E | |
FDD1-2ZWRVQ | |
FDD1-302ER0 | |
FDD1-3X1J6V |
OlderNewer