Skip to content

Instantly share code, notes, and snippets.

View rickmzp's full-sized avatar

Rick Martínez rickmzp

  • LineLeap
  • New York, NY
  • 09:16 (UTC -05:00)
  • X @rickmzp
View GitHub Profile
@data = open("gettysburg.txt").read
@longest_palindrome = ""
@position = 0
def regex
/#{@data[@position, @longest_palindrome.length + 1].reverse}/
end
require 'socket'
socket = TCPSocket.new "192.168.201.133", 1337
socket.puts "GET /8\n\n"
results = {}
total_lines = 0
begin
puts "Scanning..."
@rickmzp
rickmzp / README
Last active December 18, 2015 19:38 — forked from cwsaylor/gist:8511
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
@rickmzp
rickmzp / gist:6360986
Created August 28, 2013 01:05
Git aliases
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'
// 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
{"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"