172 karma · joined April 9, 2019
here is a peg grammar:
text = $.*
you can try it at https://pegjs.org/online :)edit: sry to disappoint but this matches binary files too :(
here is a direct link so people don't have to copy/paste https://innerscene.com/products
- makes code that works
- solves people's problems
- doesn't care what other programmers think
edit: the truth is a boring programmer won't even read this, just doesn't care, doesn't read hn, just does stuff
found a ruby one: https://github.com/wintron/hola/packages/4057 (yes! got it working)
http://stackoverflow.com/questions/13204/why-doesnt-my-cron-... (still works)
http://stackoverflow.com/questions/21064/massive-reputation-... ("this question was removed from stack overflow for reasons of moderation", still available: https://i.imgur.com/Csy94IL.png)
adding an index:
add_index :tags, :name
adding a null constraint: change_column :tags, :name, :string, null: false
validates :name, presence: true # for proper validations
https://github.com/localhostdotdev/bug/commit/3765237008c36c... rails g model Post published_at:datetime title content:text
rails g model Comment post:references author published_at:datetime content:text
rails g model Tag name
rails g model PostTag post:references tag:references
class Post < ApplicationRecord
has_many :comments
has_many :post_tags
has_many :tags, through: :post_tags
end
class Tag < ApplicationRecord
has_many :post_tags
has_many :posts, through: :post_tags
end
from there it's just regular rails: Tag.find_by(name: "something").posts
Post.joins(:tags).where(tags: { name: "something" })
Tag.create(name: "something")
Post.create(...)
Tag.first.posts << Post.all.sample(2)
made a little repo if people want to play with it: https://github.com/localhostdotdev/bug/tree/orm-or-not-ormfor the strike part, wouldn't it be better to use a satellite-based system, I would think it could reach any place on earth much faster given the initial velocity of being in orbit.
e.g. missiles/drones would be launched from a satellite at 8000m/s (17000 mph, 3/4 times faster than the SR-72), and they could be distributed globally. I'm just unsure about the descent phase but sounds like it would work out.
there is something similar for voting systems but it isn't as elegant: https://en.wikipedia.org/wiki/Comparison_of_electoral_system...
how can you even measure if a voting system is a success?
the original twitter thread (first test drive): https://twitter.com/VictorPontis/status/1121521771633500160
I could definitely see VC money going into this, maybe even an existing company doing it.
the parking spots could have temporary structures to make it more like an office, have plugs, internet, etc.
then it could expand globally and it's no issue if it's outlawed in one city/country, just go to the next city/country.
e.g. https://assets.documentcloud.org/documents/5977583/New-York-... and https://assets.documentcloud.org/documents/5977583/New-York-...
(url can be easily derived from the urls in the csv, "https://www.usatoday.com/documents/5977583-New-York-Decertif... in this case)
if 99%-100% of homes were occupied then it would reach saturation (hard to buy/rent homes)
Google's https://material.io/design/
I guess most companies have a design system in place
.score { display: none } /* stories and own comments */
.pagetop { color: transparent !important; } /* hide karma top right (also hides username and logout) */
#me, #logout { color: black } /* show username and logout */
#hnmain > tbody > tr:nth-child(3) > td > form > table > tbody > tr:nth-child(3):not(.athing) { display: none } /* own profile */
#hnmain > tbody > tr:nth-child(3) > td > table > tbody > tr:nth-child(3):not(.athing) { display: none } /* other user profile */
I don't think it could easily be truly hidden but a css experiment might be interesting.btw it has "telemetry" enabled by default.
edit: thanks for the link, didn't find the source previously