I hereby claim:
- I am presidentbeef on github.
- I am presidentbeef (https://keybase.io/presidentbeef) on keybase.
- I have a public key whose fingerprint is 56C5 4454 50FF 9138 7CC6 6C0D A6A5 CB66 1402 CC6A
To claim this, I am signing this object:
====================================================== | |
Used jruby 1.6.5 (ruby-1.8.7-p330) (2011-10-25 9dcd388) (OpenJDK 64-Bit Server VM 1.6.0_22) [linux-amd64-java] | |
Started at Thu Jan 26 13:17:21 -0800 2012 | |
Finished at Thu Jan 26 13:25:56 -0800 2012 | |
Scanned 2 path(s) | |
Total time: 515.036000013351s | |
------------------------------------------------------- | |
../nventory/trunk/server/ @ Thu Jan 26 13:17:55 -0800 2012 | |
66 controllers, 59 models, 1568 templates, 0 errors | |
total_time: 480.528000 (480.528000) |
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'ruby_parser' | |
require 'pp' | |
pp RubyParser.new.parse ARGV[0] |
#activesupport/lib/active_support/core_ext/hash/conversions.rb | |
unless defined?(XML_PARSING) | |
XML_PARSING = { | |
- "symbol" => Proc.new { |symbol| symbol.to_sym }, | |
+ "symbol" => Proc.new { |symbol| symbol.to_s }, | |
"date" => Proc.new { |date| ::Date.parse(date) }, | |
"datetime" => Proc.new { |time| ::Time.parse(time).utc rescue ::DateTime.parse(time).utc }, | |
"integer" => Proc.new { |integer| integer.to_i }, | |
@@ -76,7 +76,7 @@ module ActiveSupport #:nodoc: | |
"decimal" => Proc.new { |number| BigDecimal(number) }, |
Loading development environment (Rails 3.2.11) | |
1.9.3p374 :001 > s = "<script>alert('hello')</script>" | |
=> "<script>alert('hello')</script>" | |
1.9.3p374 :002 > ERB::Util.html_escape s | |
=> "<script>alert('hello')</script>" | |
1.9.3p374 :003 > safe = s.html_safe | |
=> "<script>alert('hello')</script>" | |
1.9.3p374 :004 > ERB::Util.html_escape safe | |
=> "<script>alert('hello')</script>" |
#!/usr/bin/ruby -w | |
require 'set' | |
Entry = Struct.new :id, :instance do | |
def self.parse(line) | |
if /ID=\s*'([^']*)'\s+INSTANCE=\s*'([^']*)'/ =~ line | |
new $1, $2 | |
else | |
raise "Cannot parse: %p" % line | |
end |
def count_swaps list, &sort_block | |
swaps = 0 | |
# Get a sorted list for comparison | |
sorted = list.sort &sort_block | |
# Check each elements against where they should be, | |
# swapping them if necessary and counting the swaps. | |
list.each_with_index do |element, index| | |
next if element == sorted[index] |
I hereby claim:
To claim this, I am signing this object:
After updating from Mageia 4 to 5, the builtin wireless on my Lenovo T440s stopped working.
When attempting to configure the card via the network center or drakconnect, I would get the message "Unable to find network interface for selected device (using iwlwifi driver)".
Removing and re-adding the iwlwifi module via modprobe
did nothing. The wireless card was definitely available according to lspci
. I had the iwlwifi-agn-ucode
package installed. ls /lib/firmare
listed several ucode files for iwlwifi-7260
.
Some investigation found Mageia 5 does not provide a kernel-tmb-laptop
package, which means I was still running on 3.14.43-tmb-laptop-1.mga4
. Changing the kernel just to go from 3.14 to 3.19 but perhaps lose laptop features didn't seem worth it.
To get the wireless working again, I just needed to go to https://wireless.wiki.kernel.org/en/users/Drivers/iwlwifi download the correct ucode file (iwlwifi-7260-ucode-25.228.9.0.tgz) which contains iwlwifi-7260-9.ucode
. Copy to /lib/firmare
, rest
To run, download the raw file. Then run:
ruby convert_ignore.rb your_new_report.json old_brakeman.ignore > new_brakeman.ignore
Then test by pointing Brakeman at the new file and checking the number of ignored warnings matches expected:
brakeman -i new_brakeman.ignore
Assuming all is well, copy the new ignore file to the old location.
Get source from https://github.com/KDE/kmuddy
Install:
For scripting plugin: