duffyjp / duffy Goto Github PK
View Code? Open in Web Editor NEWGem containing a collection things I find myself using across many projects.
License: MIT License
Gem containing a collection things I find myself using across many projects.
License: MIT License
This is one place I don't think there is a way around a native extension...
I wrote a small C program which extracts the info for Mac OS. See https://github.com/duffyjp/duffy/tree/multi_cpu_load
No actual integration has been done yet.
(title)
3.2.2 :002 > Duffy::System.cpu_model
=> "Apple M1 Max"
Bundle complete! 32 Gemfile dependencies, 102 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
/var/lib/jenkins/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/specification.rb:2158:in `method_missing': undefined method `this' for #<Gem::Specification:0x930a1c duffy-0.3.5> (NoMethodError)
from /var/lib/jenkins/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/specification.rb:1057:in `find_active_stub_by_path'
from /var/lib/jenkins/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:64:in `require'
from /var/lib/jenkins/.rvm/gems/ruby-2.3.1/gems/rb2db-0.2.2/exe/rb2db:2:in `<top (required)>'
from /var/lib/jenkins/.rvm/gems/ruby-2.3.1/bin/rb2db:23:in `load'
from /var/lib/jenkins/.rvm/gems/ruby-2.3.1/bin/rb2db:23:in `<main>'
from /var/lib/jenkins/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `eval'
from /var/lib/jenkins/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `<main>'
Created database 'db/test.sqlite32'
I'm currently pulling the "MemAvailable:" line out of /proc/meminfo, but that line doesn't appear on a 14.04 box.
$ cat /proc/meminfo
MemTotal: 65863376 kB
MemFree: 56040264 kB
Buffers: 611144 kB
Cached: 6835812 kB
SwapCached: 0 kB
Active: 5148900 kB
Inactive: 3577508 kB
Active(anon): 1280256 kB
Inactive(anon): 100 kB
...
Create a markdown table from a 2D Array
puts [["Car", "Boat", Date.today, 5],["Horse", "Car", nil, 0]].to_markdown
String | String | Date | Integer
-------|--------|------------|---------
Car | Boat | 2022-01-12 | 5
Horse | Car | | 0
String | String | Date | Integer |
---|---|---|---|
Car | Boat | 2022-01-12 | 5 |
Horse | Car | 0 |
Something like this:
def nl2br
(self.nil?)? "" : self.to_s.gsub(/(\r\n)|(\n\r)|\n|\v/, "<br>").html_safe
end
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.