Better HN
topnewbestaskshowjobs
Log inSign up

byteface

141 karma · joined Nov 6, 2013 (13y ago) · 139 submissions

https://github.com/byteface
Submissions

comment 5y ago · link · parent

never tried to post code on here. didn't realise it wouldn't render.

comment 5y ago · link · parent

  import os
  from flask import Flask, request, render_template, redirect
  import requests
  import shutil

  app = Flask(__name__)

  @app.route('/handle_form', methods=['POST'])
  def handle_form():
      f = request.files['file']
      f.save(os.getcwd()+'/files/'+f.filename)
      return redirect("/", 302);

  @app.route("/")
  def index():
      return render_template("index.html");

  if __name__ == "__main__":
      app.run(host='0.0.0.0', port=8080, debug=True)

  # <!-- index.html -->
  # <!DOCTYPE html>
  # <html>
  # <head>
  #     <title>Send File</title>
  # </head>
  # <body>
  #     <h1>Send File</h1>
  #     <form action="handle_form" method="post" enctype="multipart/form-data">
  #         <input type="file" name="file">
  #         <input type="submit" value="Upload">
  #     </form>
  # </body>
  # </html>

comment 5y ago · link · parent

ah sorry you said never heard one that DOESN"T sound better. lol. just realised.

comment 5y ago · link · parent

I guess as you don't watch movies you missed this cover. Which got pretty close... https://www.youtube.com/watch?v=ggGO8rF4jJM

What I like about Dylan is that his lyrics seem to try to avoid cliches rather than over use them so he uncovers truths that go against the social memetic way of thinking.

comment 5y ago · link · parent

I think speed is misinterpretted. I meant as a minimum benchmark, as in it won't be slower than your unorthodox methods once you are good at it. Not as a max. Typing words as you think them IMO beats holding your breathe and playing 3 finger whackamole to get a paragraph out while looking down at the keyboard. I have also been half way between 2 methods and glad I was able to transition over fully. As someone mentioned it also works on split keyboards.

comment 5y ago · link · parent

that was my point. the two little lumps on 'f' and 'j' are so you know where to put your pointer fingers in the dark. touch typers feel for them so they can type without looking. It's cool that you can just do that, without knowing, over time.

comment 5y ago · link · parent

So you feel for the 'home keys' instincitvely without looking? every time you type? and never had a single lesson?

comment 5y ago · link · parent

I'll point out i learned at about 25. im 40 now. at that time i rated myself too.

comment 5y ago · link · parent

when my missus goes to bed. i can still game without a backlit keyboard. you can't.

comment 5y ago · link · parent

I was inspired by a guy from Brazil to learn to touch-type. It not on the national curriculum in the UK. I'd say well over half of UK coders can't touch-type. I can easily do 90+ words per minute without trying. I just think and my fingers wobble and words appear. It's like magic. I'd say everyone should learn.

I learned to run code without re-reading it from a bad coder. I used to spend a few mins reading code I'd written to double check it. Then i worked with a guy that just would run code, it would error, my heart would jump, but the world wouldn't explode. So I do that too nowadays a little bit sometimes. Just run the code after writing it without rereading it. It's scary but works 85% of the time. thing is you can run code twice and let the console tell you the issue often quicker than you reading it carefully. (be careful with this tip.) .i.e there's a time to do it and a time not to. i.e. if your changing some css block, you may not need to reread it 5 times before refreshing the page. but if you are about recursively rm some dir then maybe check.

comment 5y ago · link · parent

30 mins in and still loving it!!!

comment 5y ago · link · parent

"i thought you said some other guy had done it already on github and all you had to do was tweak it." "na. it didn't work the solution ended up being these 2 solutions on stackoverflow that i copied and pasted together." "you're a genius." "thanks"

comment 5y ago · link · parent

because im vacuuming the db, flushing the cache, rotating the logs, retrieving the stats, rebooting the server, teaching you to change the background in the chat, commenting on the tickets, adding to the docs, onboarding the noobs, upgrading the libraries, adding ips to the firewall, updating the ssl cert, installing, compiling, backing-up, migrating, doing my timesheets, ive got 3 'training modules' i haven't completed yet, 5 invites to a PMs weekly catchup I cant make, I've been asked to review the spec on some other project, still need to setup the VPN access, get passwords for the VNC, need to email support to put my keys on the new server so i can jump host as working remotely, editing crons, editing configs, security updates, replying to client emails... oh and that line of code i wrote this week. sadly I had to write that as there was no other solution. I mean I googled like fuck for ages but this is the only way.

comment 5y ago · link · parent

2 that make me chuckle...

If you ask a programmer, 'Do you want tea or coffee?' he will reply 'yes'.

and

q: What's Benoit B. Mandelbrot's middle name? a: Benoit B. Mandelbrot

comment 6y ago · link · parent

someone waking you up during rem should do it right? or about 4 days after quitting weed. those ones get real powerful and lucid.

comment 6y ago · link · parent

you ever had a dream?

comment 6y ago · link · parent

ye I noticed they swap them sometimes as well. which i hate. i'm really picky about that. Even slightest difference to the version I like can make me hate any other version. so getting one slightly faster from another album is no good for me.

comment 6y ago · link · parent

I noticed spotify delete tracks without telling you a few years back. So setup IFTT to write any files I add to a playlist to a gsheet

comment 6y ago · link · parent

I worked at a place about 10 years ago where one of the projects was with penguin books. They spent 12 months with a team of several developers building this as amazing product for students where you could pick chapters from several books to print your own single book. All done in ajax which at the time was rare. It was really good. Random house media decided to not go ahead with, it I think because of copywrite rules etc and binned it. Felt for the devs. They were so proud and put many late hours in.

comment 6y ago · link · parent

I used fb a few times due to ease...

<div class="fb-comments" data-href="http://yoursite.com/yourpage” data-width="100%" data-numposts="5" data-colorscheme="light" data-order-by="time"></div>

comment 6y ago · link · parent

great. now to add benny hill theme to all bulid scripts... https://www.youtube.com/watch?v=MK6TXMsvgQg

comment 6y ago · link · parent

If neurons that fire together wire together. Can we assume there's a shared subprocess and this is just a type of compression?

comment 6y ago · link · parent

True that all thought is abstraction. But not necessarily compression? Hypostatic abstraction would expand the data as would building any kind of new relations? Neuro modulators are brain-wide. We can also change our perception.

comment 6y ago · link · parent

Flaubert's Parrot

comment 6y ago · link · parent

there was a cool Desktop UI thread on here a few weeks ago... https://simone.computer/#/webdesktops

comment 6y ago · link · parent

I worked with a guys who said 'one of the reasons' he quit medical research was because of the amount of mice he had to kill on a daily basis. He said, "the quick way is to snap their necks with the back of your pencil." as he demonstrated on the desk the technique of how to hold the pencil a certain way.

comment 6y ago · link · parent

I feel looking for musical scores in peoples brains is a great place to start decoding. We clearly load data into a conscious signal somehow like CAN-bus but it must also be stored maybe on actin filaments in the dendritic spines as loops we load in? Also mentally we can change the music and add any number of instruments over the top change the tune and deviate the course of the melody, add vocal harmonies from crowds of people and violins etc. so where does that part happen?, in the signal?. can it be 'heard'? . and is the music 'composer' happening in the same part of the brain as the language generating part or is it just similar capabilities in a different part of the brain?. Decoding must be possible. I feel if they had like millions of brains all wired up to computers that were using AI to find match patterns . i.e. audio patterns from songs in brains data. they could brute force it? Is getting people to sing stuff and making assumptions weak science?

comment 6y ago · link · parent

if ur on a mac shake the cursor really fast and the arrow grows massive. never noticed that before. I was using my curosor to check the blindspot on my eye and was wiggling it in and out at the edge and it freaked me right out. it went in small, disappeared and came out 20x larger. I was like fuck me these eye tricks are mental.

comment 6y ago · link · parent

On a mac there is a tool called 'voice control' which can trigger custom 'commands' or keyboard shortucts. You can use it to trigger shortcuts in any IDE. So if your IDE supports custom shortcuts for templating you're away.
12345