Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
enterprise_time_extensions
Advanced tools
h1. Enterprise Time Extensions
Enterprisey extensions to Ruby's Time class. How else will you know when it's OK to stop avoiding work, and you can actually leave work?
Example:
h2. Un-Fun, All-Business Instance Method Examples
t = Time.now #=> Fri Jan 09 22:12:31 0100 2009
# Enterprisey methods in action!:
t.after_hours? #=> false
t.holiday? #=> false
t = Time.local(2009, 12, 25) #=> Fri Dec 25 00:00:00 0100 2009
t.after_hours? #=> true -- because it's a holiday
t.holiday? #=> true -- I told you!
t = Time.local(2009, 1, 9, 18, 30) #=> Fri Jan 09 18:30:00 0100 2009
t.after_hours? #=> true -- Business hours are 8AM to 6PM ... SHARP!
t.holiday? #=> false
There are question mark methods for the holidays that are paid-time-off for slaves of The Enterprise.
If you need/want more, let me know! You're welcome to do it yourself, if you wish.
h2. Frank, Straight-Shooting Class Methods
# Countdown to the next football game?
Time.next_sunday #=> Sun Jan 11 00:00:00 0100 2009
# The big one:
Time.nth_wday(3, 6, 7, 2009) #=> Sat Jul 18 00:00:00 0200 2009
Time::nth_wday could probably use some explanation. Time::nth_wday will find the 'nth' week day of a month. Above, we found the 3th (hehe) Saturday of July 2009. This is actually used often in the various holiday methods from above. For instance, Thanksgiving is on the 4th Thursday of November. The method looks like this:
def self.nth_wday(n, wday, month, year)
# ...
end
Enjoy!
(I feel obligated to tell you, honestly, that the environment at nFrame is far removed from the usual negative implications of the word 'Enterprise'. It's quite nice, actually. Oh, and we only have like 40 total employees.)
FAQs
Unknown package
We found that enterprise_time_extensions demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.