All Projects → rubycoco → monos

rubycoco / monos

Licence: CC0-1.0 license
cocos (code commons) - auto-include quick-starter prelude & prolog

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to monos

gems
Ruby Football Week 2021, June 11th to June 17th - 7 Days of Ruby (Sports) Gems ++ Best of Ruby Gems Series
Stars: ✭ 76 (+40.74%)
Mutual labels:  gems
cocos-creator-
左右跳一跳游戏
Stars: ✭ 13 (-75.93%)
Mutual labels:  cocos
firing balls
Physical pinball game with cocos creator 小游戏【不停歇的球】源码
Stars: ✭ 120 (+122.22%)
Mutual labels:  cocos
GemsAssetsWebpackBridge
It helps to build a bridge from ruby gems' assets to Webpack
Stars: ✭ 20 (-62.96%)
Mutual labels:  gems
commons-parent
Apache Commons Parent
Stars: ✭ 21 (-61.11%)
Mutual labels:  commons
awesome-radical-decentralization
Awesome projects for radical decentralization.
Stars: ✭ 84 (+55.56%)
Mutual labels:  commons
rubysu
Give Ruby objects superuser privileges
Stars: ✭ 15 (-72.22%)
Mutual labels:  gems
nhwc-client
2018毕业设计,多人房间匹配你画我猜。Cocos Creator + TypeScript + Go + WebSocket + MongoDB。客户端
Stars: ✭ 47 (-12.96%)
Mutual labels:  cocos
Spell4Wiki
Spell4Wiki is a mobile application to record and upload audio for Wiktionary words to Wikimedia commons. Also act as a Wiki-Dictionary.
Stars: ✭ 17 (-68.52%)
Mutual labels:  commons
commons-jexl
Apache Commons Jexl
Stars: ✭ 136 (+151.85%)
Mutual labels:  commons
subjuster
A Ruby based CLI for Subtitle adjustment | TDD Guide for Software Engineers
Stars: ✭ 17 (-68.52%)
Mutual labels:  gems
dotfiles
These are my dotfiles. All the config stuff that I use is here.
Stars: ✭ 16 (-70.37%)
Mutual labels:  prelude
commons.openshift.org
Repository for OpenShift Commons Community Site
Stars: ✭ 31 (-42.59%)
Mutual labels:  commons
books
List of all Ruby books
Stars: ✭ 49 (-9.26%)
Mutual labels:  gems
mmt
margins merkle tree | grass roots collective crypto speculation
Stars: ✭ 15 (-72.22%)
Mutual labels:  commons
events
events - tools, libraries & scripts, schemas & formats - (incl. whatson, rubyconf, pycon, beerfest & more)
Stars: ✭ 12 (-77.78%)
Mutual labels:  gems
stdgems
Ruby's default & bundled gems: The new standard library
Stars: ✭ 94 (+74.07%)
Mutual labels:  gems
agon
🦉 my golang utilities, log json config and other
Stars: ✭ 12 (-77.78%)
Mutual labels:  commons
encrypted cookie
AES-128 encrypted session cookies for Rack (and Sinatra and other frameworks).
Stars: ✭ 54 (+0%)
Mutual labels:  gems
git
git (and github) & monorepo / mono source tree command line tools, libraries & scripts
Stars: ✭ 16 (-70.37%)
Mutual labels:  gems

cocos (code commons) - auto-include quick-starter prelude & prolog

Intro - Why?

Reason No. 1

After starting of too many scripts (hundreds?) with adding more and always repeating the same dozen modules with require e.g.:

require 'pp'
require 'time'
require 'date'
require 'json'
require 'yaml'
require 'base64'
require 'fileutils'

require 'uri'
require 'net/http'
require 'net/https'

...

why not use a more "inclusive" prelude & prolog and replace the above with a one-liner:

require 'cocos' # auto-include code commons quick-starter prelude & prolog

Reason No. 2

After reading too many text files in utf-8 and always repeating the same open / read and code block dance e.g.:

txt = File.read( "history.txt" )
# sorry - will NOT guarantee unicode utf8-encoding
# (e.g. on microsoft windows it is ISO Code Page (CP-1252
# or something - depending on your locale/culture/language)

txt = File.open( "history.txt", "r:utf-8" ) do |f|
             f.read
         end

Or after reading and parsing too many json files (by default always required utf-8 encoding) and always repeating the same open / read and code block dance again and again e.g.:

txt  = File.open( "history.json", "r:utf-8" ) do |f|
             f.read
         end
data = JSON.parse( txt )

Why not use read convenience / short-cut helpers such as:

txt  = read_txt( "history.txt" )
data = read_json( "history.json" )

And so on.

Usage

Read / Parse

Read / parse convenience short-cut helpers

read_blob( path )
also known as read_binary or read_bin

read_text( path )
also known as read_txt

read_lines( path )

read_json( path ) / parse_json( str )

read_yaml( path ) / parse_yaml( str )

read_csv( path, headers: true ) / parse_csv( str, headers: true )

note: comma-separated values (.csv) reading & parsing service brought to you by the csvreader library / gem »

read_data( path ) / parse_data( str )

note: alternate shortcut / alias for read_csv( path, headers: false ) / parse_csv( str, headers: false )

read_tab( path ) / parse_tab( str )

note: tabulator (\t)-separated values (.tab) reading & parsing service brought to you by the tabreader library / gem »

read_ini( path ) / parse_ini( str )
also known as read_conf / parse_conf

note: ini / conf(ig) reading & parsing service brought to you by the iniparser library / gem »

That's it for now.

License

The cocos scripts are dedicated to the public domain. Use it as you please with no restrictions whatsoever.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].