How to report vulnerabilities on different package services.
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 'YOUR_APPLICATION' | |
run Sinatra::Application | |
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
# :PROCESS: ruby, "ruby %f 2>&1" | |
# :BRACKET_CODE: "[ruby]", "[/ruby]" | |
# :TEXT: | |
# | |
# In the <a | |
# href="http://devver.net/blog/2009/06/a-dozen-or-so-ways-to-start-sub-processes-in-ruby-part-1/">previous | |
# article</a> we looked at some basic methods for starting subprocesses in Ruby. | |
# One thing all those methods had in common was that they didn't permit a lot of | |
# communication between parent process and child. In this article we'll examine | |
# a few built-in Ruby methods which give us the ability to have a two-way |
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
Installing Ruby 2.0.0 on Kindle | |
=============================== | |
So I've just jailbroken my Kindle, and want to run Ruby on it. | |
This is what I have right now on my Kindle: | |
* [KUAL](http://www.mobileread.com/forums/showthread.php?t=203326), the Kindle Unified Applications Launcher | |
* [KTERM](http://www.fabiszewski.net/kindle-terminal/) with tmux | |
Make sure you've also enabled `usbnetwork` so that you can SSH to your kindle via USB. |
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
#!/usr/bin/env ruby | |
# this tool is similar to "git bisect" one, but for specs. | |
# it tries to find what spec from list of specs breaks execution of one specified spec. | |
# | |
# see more at http://zed.0xff.me/2010/01/28/rspec-bisect | |
# | |
# usage example: | |
# ./rspec-bisect.rb spec/**/*_spec.rb spec/controllers/spaces/tickets_controller_spec.rb | |
# [.] rspec runner: ./script/spec |
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 'net/http' | |
require 'json' | |
def rubygems_get(gem_name: "", endpoint: "") | |
path = File.join("/api/v1/gems/", gem_name, endpoint).chomp("/") + ".json" | |
JSON.parse(Net::HTTP.get("rubygems.org", path)) | |
end | |
results = rubygems_get(gem_name: "mime-types", endpoint: "reverse_dependencies") |
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
# :PUBLISHER: markdown, shell, { command: 'rdiscount' } | |
# :BRACKET_CODE: '[ruby]', '[/ruby]' | |
# :TEXT: | |
# | |
# Have you ever started a long operation and walked away from the computer, and | |
# come back half an hour later only to find that the process is hung up waiting | |
# for some user input? It's a sub-optimal user experience, and in many cases it | |
# can be avoided by having the program choose a default if the user doesn't | |
# respond within a certain amount of time. One example of this UI technique in | |
# the wild is powering off your computer - most modern operating systems will |
Links and Notes from my Classy Git RubyConf talk:
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 'rubygems' | |
require 'time' | |
require 'fileutils' | |
require 'httparty' | |
require 'nokogiri' | |
require 'pp' | |
APIToken = 'your-api-token-goes-here' | |
APIServer = 'http://sample.campfirenow.com' |
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
# I was trying to figure out how to get a list of changes made remotely on Git | |
# before applying. Here's what I came up with. | |
# First, get the latest data from the origin | |
git fetch origin | |
# Then, get the changes and output to a file | |
git log HEAD..origin/master > changes.txt | |
# Merge changes in |