Giter VIP home page Giter VIP logo

commitment's Introduction

Looking For Sponsors

Enjoying https://whatthecommit.com/ ? Consider becoming a sponsor of this project. Your contributions keep the site running.

https://github.com/users/ngerakines/sponsorship

About WTC (What The Commit)

Commitment is a small Tornado application that generates random commit messages.

https://whatthecommit.com/

Commitment also provides https://whatthecommit.com/index.txt which provides plain text output.
Some interesting usage for that can be:

git config --global alias.yolo '!git commit -m "$(curl -s https://whatthecommit.com/index.txt)"'

Or use one of the following VSCode Extensions:

License

Copyright (c) 2010-2021 Nick Gerakines [email protected]

This project and its contents are open source under the MIT license.

commitment's People

Contributors

ajhenriques avatar alashow avatar amayer5125 avatar azhu2 avatar coopermaruyama avatar dsanch3z avatar forcetower avatar foutrelis avatar gusdleon avatar htroyack avatar iwader avatar jucke avatar kristories avatar maciejorlinski avatar mariomurrent-softwaresolutions avatar mica-angeli avatar nap01234 avatar ngerakines avatar opatut avatar r0one avatar reisraff avatar saimonn avatar sepehr avatar stefanobaghino avatar thrau avatar tomhukins avatar wickedone avatar xenhat avatar ylogx avatar zanza00 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

commitment's Issues

Commit Message Request

Looking through the file of the commits, I don't see many/any of my favorite variety: random keystrokes.

For instance:

asdf
l;sdkfj
as;dfj
pwoeir
eruip
poiewur

How is this a generator

How is this a generator if all the messages are hard-coded? I'm having a bit of trouble understanding..

Generate whatthecommit messages locally w/o web server?

I pull messages from whatthecommit.com all the time in scripts meant to sync my private git repos, because I’m the only one who will see those commits and this makes them freaking hilarious. I’m wondering if the code to generate them could be run locally, without using the Tornado web application server (or whatever it is). I’m sure this would save on your bandwidth 😅

No context

There isn't much context for this site; What is this? Where are these messages from, are they on github?

No dogfooding evident

It's clear from the commit log for this repository that the commitment
commit-message generator was not used to produce commit messages for this
project's development. (This is most noticeable in the fact that the commit
messages actually mention the project they are for.)

The practice of dogfooding encourages software to improve as well as provide it
with valuable field testing, and this application seems a prime candidate.
Therefore, I recommend that all future commits to this project are given a
commit message through commitment, using:

-m "`curl -s http://whatthecommit.com/index.txt`"

json api ?

I want to add to my website from the offical site not from my js file.

BTW: CROS

Website is down (504 Gateway Time-out)

➜  ~ curl https://whatthecommit.com/index.txt -v                                                                                                                                                                               
*   Trying 3.13.11.91:443...                                                                                                                                                                                                   
* Connected to whatthecommit.com (3.13.11.91) port 443 (#0)                                                                                                                                                                    
* ALPN, offering h2                                                                                                                                                                                                            
* ALPN, offering http/1.1                            
*  CAfile: /etc/ssl/certs/ca-certificates.crt                                                                  
*  CApath: /etc/ssl/certs                                                                                      
* TLSv1.0 (OUT), TLS header, Certificate Status (22):                                                          
* TLSv1.3 (OUT), TLS handshake, Client hello (1):                                                              
* TLSv1.2 (IN), TLS header, Certificate Status (22):                                                           
* TLSv1.3 (IN), TLS handshake, Server hello (2):                                                               
* TLSv1.2 (IN), TLS header, Certificate Status (22):                                                           
* TLSv1.2 (IN), TLS handshake, Certificate (11):                                                               
* TLSv1.2 (IN), TLS header, Certificate Status (22):                                                           
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):                                                       
* TLSv1.2 (IN), TLS header, Certificate Status (22):                                                           
* TLSv1.2 (IN), TLS handshake, Server finished (14):                                                           
* TLSv1.2 (OUT), TLS header, Certificate Status (22):                                                          
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):                                                      
* TLSv1.2 (OUT), TLS header, Finished (20):                                                                    
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):                                                    
* TLSv1.2 (OUT), TLS header, Certificate Status (22):                                                          
* TLSv1.2 (OUT), TLS handshake, Finished (20):                                                                 
* TLSv1.2 (IN), TLS header, Finished (20):                                                                     
* TLSv1.2 (IN), TLS header, Certificate Status (22):                                                           
* TLSv1.2 (IN), TLS handshake, Finished (20):                                                                  
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server accepted to use h2                                                                              
* Server certificate:                                                                                          
*  subject: CN=whatthecommit.com                                                                               
*  start date: Apr 10 09:55:08 2023 GMT                                                                        
*  expire date: Jul  9 09:55:07 2023 GMT                                                                       
*  subjectAltName: host "whatthecommit.com" matched cert's "whatthecommit.com"                                 
*  issuer: C=US; O=Let's Encrypt; CN=R3                                                                        
*  SSL certificate verify ok.                                                                                  
* Using HTTP2, server supports multiplexing                                                                    
* Connection state changed (HTTP/2 confirmed)                                                                  
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0                               
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
* TLSv1.2 (OUT), TLS header, Supplemental data (23):                                                           
* Using Stream ID: 1 (easy handle 0x55aea7724e90)   
* TLSv1.2 (OUT), TLS header, Supplemental data (23):                                                           
> GET /index.txt HTTP/2                             
> Host: whatthecommit.com                                                                                      
> user-agent: curl/7.81.0                                                                                      
> accept: */*                                                                                                  
>                                                                                                              
* TLSv1.2 (IN), TLS header, Supplemental data (23):                                                            
* Connection state changed (MAX_CONCURRENT_STREAMS == 128)!
* TLSv1.2 (OUT), TLS header, Supplemental data (23): 
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
< HTTP/2 504                                         
< server: awselb/2.0                            
< date: Wed, 28 Jun 2023 15:17:02 GMT           
< content-type: text/html                            
< content-length: 132                           
<                                                    
<html>                                          
<head><title>504 Gateway Time-out</title></head>     
<body>                                               
<center><h1>504 Gateway Time-out</h1></center>       
</body>                                              
</html>

Same seems to be the case with your website and Mastodon, so maybe related?

Language

So thanks guys.. I have used this service for my company to submit code. Now and forever there will be "Shit code" as one of my commits.

I like the random commits that are snarky and funny. Could we have a clean version.. so I can keep my job and continue shitposting?

Thanks.

Missing License File

Adding a LICENSE file to your repo on github will add a License link on the project info bar. This is helpful when people are searching for projects with a specific license.

textual version

Add a route to get a random commit message in text, allowing to make

git commit -a -m "`curl -s http://whatthecommit.com/`"

Add CORS headers

Cannot request messages from a frontend unless it has CORS enabled :)

whatthecommit.com can't use in China

When I use the command curl -s https://whatthecommit.com/index.txt, it return 403 Forbidden.

And this also occurs when accessing the site with a browser. Both http and https.

this is the return context:

<html>
<head><title>403 Forbidden</title></head>
<body>
<center><h1>403 Forbidden</h1></center>
</body>
</html>

website is down?

Somebody forgot to pay the domain name yearly subscription 🥁

Add to commit-msg hook as prank

This makes a decent prank. By sticking something like:

curl -s https://raw.github.com/ngerakines/commitment/master/commit_messages.txt | shuf -n1 > "$1" | sed s/XUPPERNAMEX/PERSONSNAME/g

in the .git/hooks/commit-msg hook file and making it executable. Maybe add a commit-msg.sample file to the repo w/ something like this? It can be made more cross platform by using sort -R | head -n1 or similar instead of GNU shuf.

Use a random commit message from the CLI

git commit -m $(curl -s https://raw.githubusercontent.com/ngerakines/commitment/master/commit_messages.txt -o /tmp/commit_msg | tail -n $[$RANDOM % `wc -l /tmp/commit_msg | tr -d "[:alpha:][:blank:][:punct:]"`] /tmp/commit_msg | head -1)

Make whatthecommit always use https

I use the whatthecommit site for my own Discord bot.
When I first connected to the site, it defaulted to HTTP, so I thought it wouldn't have HTTPS available.

However, this caused my bot to throw UnknownHostExceptions at random moments, when connecting to the site, to receive a random commit,
I later found out (Just now to be more exact) that the site actually offers HTTPS connections and using that seems to have solved my issue.

Since connections don't default to HTTPS, I would suggest to actually make it move to HTTPS when connecting over HTTP since this is A) Saver in general, B) More trustworthy and C) most likely prevents issues as I had.
I would also recommend to show and use the default HTTPS link in the readme.

If there are any reasons, why the site shouldn't default to HTTPS I would be glad to know those.

I'm sorry when this was the wrong place for those suggestions, but I didn't find any better place.

Use arbitrary hash to select commit message.

git uses SHA1 hashes for content. It would be nice if we could request contents based on those hashes (or other content, really) in a deterministic way.

Because the hashes used by commitment are generated based on message content, what would be needed is an inexpensive deterministic way to map from the set of all strings to the set of MD5 hashes used by this project.

A deterministic, time-bounded way to do this would be by initializing a random number generator with the numeric representation of the SHA1 / MD5 hash, then sampling from messages with that RNG. Given that it'd always be seeded in the same way, this would be deterministic and O(1). Since we don't need crypto-level hash guarantees, this ought to be sufficient.

The request would look like:

GET http://whatthecommit.com/[index.txt]?content-hash=md5sum

with responses the same as they are presently.

Thoughts on adding this? I'm going to look into submitting a PR to do this this weekend.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.