So I was building an “apply to work here” application for the company I work for, and I was using Django as my framework. My company has a bunch of entry level/part time jobs we post, so people would usually want to apply for more than one at a time, meaning on the apply page there is a list of jobs, and you check off one or more positions you want to be considered for. You then have to upload one resume and one or more cover letters depending on the job you applied for.
From the Admin side, I wanted managers to be able to login and download a zip file that had all the resumes and cover letters for applicants in their area, and I also wanted to include a CSV file in that zip download with an overview of everyone and the various fields they fill out when submitting their application. I built this as a action for the list view in the admin, but the core functionally (make a CSV from a DB and add it to a zip file) can be used in any situation
I’m not a huge fan of Google Apps or whatever they are calling them these days, as I prefer the power of Office. But 365 is not free and I really do appreciate the power of realtime collaboration you get when working on a Google Apps file.
Something I just discovered was that you can use SQL in Sheets. You can query up any table (set of data) you have using SQL. Being a programming, and always wanting to see data in different views, I love this. Continue reading “Using SQL with Google Sheets to create Views”
I like to use a copy of the production data when I’m testing out new features I’m building on my development version of the site. I just find that having real data leads to less unexpected issues. Here is a script I wrote to download that data from the production machine and copy it to my development machine. It also backups a copy of the database on production and keeps a copy of the db you’re replacing on dev.
There is this form that people enter a bunch of info and attached 1 to 7 files too. The files get uploaded to a web server directory and the form responses are stored in a mysql table. I wanted to create a script that would let me download all responses including the uploaded files, as having to SSH in to download the files, and then dump the info from mysql to a csv file was annoying. Continue reading “Make a zip of files in PHP”
Typing long commands out in the terminal can be a pain, like SSHing into a server you use daily.
To make a shortcut, edit your bash_profile
Then add the shortcut by adding this line to the bottom of the file
alias someservername='ssh -p 1234 firstname.lastname@example.org'
Then all you have to do to connect to that server in the future is
You can do this with any command, not just ssh. But if you do it with SSH, you should setup public key authentication to speed that up. I'll write about that sometime cause I always forget how to do that too.
Here are some other ones I have setup on my machines. (I got these of the internet at some point. I don't know where)
alias ll='ls -lh'
alias la='ls -lhA'