Next Page
How to Use the Ls Command on Linux or Mac OS X to Sort Files based on Second in the Timestamp
Here is the one liner. ls -lhtTr It will output something like total 24152 -rw-rw-r-- 1 sean staff 1.0M May 4 14:31:42 2019 4c2caf52cb084ea39a6a65a0e68ee382 -rw-rw-r-- 1 sean staff 1.0M May 4 14:31:44 2019 76eeeea5d...
Written by Sean Behan on 05/04/2019
How to Use the Ls Command on Linux or Mac OS X to Sort Files based on Second in the Timestamp
Here is the one liner. ls -lhtTr It will output something like total 24152 -rw-rw-r-- 1 sean staff 1.0M May 4 14:31:42 2019 4c2caf52cb084ea39a6a65a0e68ee382 -rw-rw-r-- 1 sean staff 1.0M May 4 14:31:44 2019 76eeeea5d...
Written by Sean Behan on 05/04/2019
Super Simple Router for React Without Any Dependencies
Here is some very simple code to render React components dynamically without using a framework or routing library. It doesn't cover pushState and URL parsing, so in that sense it isn't a routing library. But it does let you render components from othe...
Written by Sean Behan on 11/16/2018
Rails Style Params in Python and Flask
Ruby on Rails does a great job of parsing arrays in form data and populating a params hash, for quick and easy access in your controllers. For instance Gives you params[:item] # => ["item 1", "item 2"] Flask doesn't do this work f...
Written by Sean Behan on 11/04/2018
How to Reset and Clear a Form Field or Textarea with Stateless Components in React
Stateless components are nice. They are simple to use and understand but can become tricky when you start thinking about data and how to manage state. In general, the consensus seems to be that if your UI is going to need state, then at least the componen...
Written by Sean Behan on 10/21/2018
How to Read and Write to a Single Cell Using PHP and Google Spreadsheets API
This post assumes you've created a project with Google's web console and downloaded a client_secret.json file from the credentials page. If not, more info is here.. https://www.twilio.com/blog/2017/03/google-spreadsheets-and-php.html Note: The tuto...
Written by Sean Behan on 10/11/2018
How to Flatten and Merge Arrays in PHP
There is no built in function for taking a multi dimensional array in PHP and flattening it into a single array. However, it's pretty easy to accomplish in a one liner. Here is the code ...
Written by Sean Behan on 09/28/2018
Parsing URL Parameters with Swift
Here is an extension you can use in your Swift (v4) projects that makes it easy to parse parameters from a url. Given a url like, "http://example.com/?x=1&y=2", you can extract the x and y parameters into a key, value data structure. Here is the s...
Written by Sean Behan on 09/23/2018
How to Handle Uploading Really Large Files in PHP
PHP has some default limits that do not work out of the box when you want to work with uploading very large files. So there are a few configuration changes you have to make to the defaults that come with PHP. These are defined in you php.ini file. The...
Written by Sean Behan on 09/20/2018
How to Chunk Large Files in Swift
How to Chunk Large Files in Swift (4.1) It takes a bit of work but this is the solution I found that finally worked, thanks to this Stack Overflow thread https://stackoverflow.com/questions/46464177/split-data-in-chunks-and-upload-to-server The example ...
Written by Sean Behan on 09/15/2018
Next Page