This file contains hidden or 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
{"contents":{"launch":{"version":"0.2.0","configurations":[{"type":"node","request":"attach","name":"Attach to node","port":9229},{"name":"Debug Local File","type":"Ruby","request":"launch","cwd":"${workspaceRoot}","program":"${workspaceRoot}/main.rb"},{"name":"Debug NextJS-Rails","type":"Ruby","request":"launch","cwd":"${workspaceRoot}","program":"${workspaceRoot}/bin/bundle exec nextjs-rails-server"},{"name":"Listen for rdebug-ide","type":"Ruby","request":"attach","cwd":"${workspaceRoot}","remoteHost":"127.0.0.1","remotePort":"1234","remoteWorkspaceRoot":"${workspaceRoot}"},{"name":"Rails server","type":"Ruby","request":"launch","cwd":"${workspaceRoot}","program":"${workspaceRoot}/bin/rails","args":["server"]},{"name":"RSpec - all","type":"Ruby","request":"launch","cwd":"${workspaceRoot}","program":"${workspaceRoot}/bin/rspec","args":["-I","${workspaceRoot}"]},{"name":"RSpec - active spec file only","type":"Ruby","request":"launch","cwd":"${workspaceRoot}","program":"${workspaceRoot}/bin/rspec","args":["-I" |
This file contains hidden or 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
// Photoshop Script to Create iPhone Icons from iTunesArtwork | |
// | |
// WARNING!!! In the rare case that there are name collisions, this script will | |
// overwrite (delete perminently) files in the same folder in which the selected | |
// iTunesArtwork file is located. Therefore, to be safe, before running the | |
// script, it's best to make sure the selected iTuensArtwork file is the only | |
// file in its containing folder. | |
// | |
// Copyright (c) 2010 Matt Di Pasquale | |
// Added tweaks Copyright (c) 2012 by Josh Jones http://www.appsbynight.com |
This file contains hidden or 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
alias g='git' | |
alias ga='git add' | |
alias gaa='git add --all' | |
alias gb='git branch' | |
alias gc='git commit' | |
alias gca='git commit -a' | |
alias gco='git checkout' | |
alias gd='git diff' | |
alias gdc='git diff --cached' | |
alias gf='git fetch' |
This file contains hidden or 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
Variation on Hashrocket's script for managing the git process | |
as documented here: http://reinh.com/blog/2008/08/27/hack-and-and-ship.html | |
Create shell scripts out of each of these, put them in your path (~/bin for example) | |
chmod 755 them and use like this: | |
This version of hack is totally different than Hackrockets. I feel that hack implies | |
that you are getting started, not finishing up. sink is Hashrockets hack. | |
$ hack branch_name | |
Test and Implement until done |
This file contains hidden or 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 'socket' | |
socket = TCPSocket.new "192.168.201.133", 1337 | |
socket.puts "GET /8\n\n" | |
results = {} | |
total_lines = 0 | |
begin | |
puts "Scanning..." |
This file contains hidden or 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
@data = open("gettysburg.txt").read | |
@longest_palindrome = "" | |
@position = 0 | |
def regex | |
/#{@data[@position, @longest_palindrome.length + 1].reverse}/ | |
end |
This file contains hidden or 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 "fog" | |
require "nokogiri" | |
def name | |
@name ||= new_resource.name + "." | |
end | |
def value | |
@value ||= new_resource.value | |
end |
This file contains hidden or 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
diff --git a/lib/ohai/plugins/rackspace.rb b/lib/ohai/plugins/rackspace.rb | |
index ee44065..0812206 100644 | |
--- a/lib/ohai/plugins/rackspace.rb | |
+++ b/lib/ohai/plugins/rackspace.rb | |
@@ -36,7 +36,7 @@ end | |
def has_rackspace_mac? | |
network[:interfaces].values.each do |iface| | |
unless iface[:arp].nil? | |
- return true if iface[:arp].value?("00:00:0c:07:ac:01") | |
+ return true if iface[:arp].value?("00:00:0c:07:ac:01") or iface[:arp].value?("00:00:0c:9f:f0:01") |
This file contains hidden or 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
# RSpec matcher to spec serialized ActiveRecord attributes. | |
# | |
# Usage: | |
# | |
# describe Post do | |
# it { should serialize(:data) } # serialize :data | |
# it { should serialize(:registers).as(Array) } # serialize :registers, Array | |
# it { should serialize(:options).as(Hash) } # serialize :options, Hash | |
# end |
This file contains hidden or 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
Test |
NewerOlder