Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

ruby

Implement an Umbraco/ASP.NET password validation script in Ruby / Python

September 4, 2022 by Magenaut

I have exported about 1K users from an Umbraco database. We have emails and hashed_passwords for each. There appears to be no per-user salt.

Categories ASP.NET, Q&A Tags asp.net, python, ruby, umbraco Leave a comment

Reimplement ASP.NET Membership and User Password Hashing in Ruby

September 1, 2022 by Magenaut

I have a large database of users (~200,000) that I’m transferring from a ASP.NET application to a Ruby on Rails application. I don’t really want to ask every user to reset their password and so I’m trying to re-implement the C# password hashing function in Ruby.

Categories ASP.NET, Q&A Tags asp.net, base64, ruby, ruby-on-rails, sha1 Leave a comment

Sublime Text 2 console input

August 21, 2022 by Magenaut

I use Sublime Text 2 but it won’t let me enter any value when my code asks for user input. (In other words: input() in Python and gets in Ruby fail to correctly prompt me for input). Python throws an EOFError error (what you get when user doesn’t enter anything). Simply USER INPUT isn’t working … Read more

Categories Python, Q&A Tags python, ruby, sublimetext2 Leave a comment

Is everything an object in Python like Ruby?

August 20, 2022 by Magenaut

I read on another Stack Overflow question that Python was just like Ruby, as it relates to “everything’s an object,” and everything in Python was an object, just like Ruby.

Categories Python, Q&A Tags language-comparisons, object, python, ruby Leave a comment

Can you monkey patch methods on core types in Python?

August 20, 2022 by Magenaut

Ruby can add methods to the Number class and other core types to get effects like this:

Categories Python, Q&A Tags fluent-interface, monkeypatching, programming-languages, python, ruby Leave a comment

Converting epoch time with milliseconds to datetime

August 16, 2022 by Magenaut

I have used a ruby script to convert iso time stamp to epoch, the files that I am parsing has following time stamp structure:

Categories Python, Q&A Tags datetime, epoch, python, ruby Leave a comment

Find the longest common starting substring in a set of strings

August 15, 2022 by Magenaut

i for i in range(min(map(len, a))), number of maximum lookups can’t be greater than the length of the shortest string; in this example this would evaluate to [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

Categories Python, Q&A Tags haskell, javascript, longest-prefix, python, ruby Leave a comment

Integer division by negative number

August 13, 2022 by Magenaut

I was asked (again) today to explain why integer division in Python returns the floor of the result instead of truncating towards zero like C.

Categories Python, Q&A Tags math, python, ruby Leave a comment

Best way to upgrade vim/gvim to 7.3 in Ubuntu 10.04?

August 8, 2022 by Magenaut

I have to use Ubuntu 10.04 at work, and can’t upgrade it. I’m using Vim/gVim 7.2.

Categories Q&A, Unix & Linux Tags gvim, python, ruby, upgrade, vim Leave a comment
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress