Skip to content

Instantly share code, notes, and snippets.

@moqdm
moqdm / log.sql
Created September 7, 2021 19:27
it's my PSet 7: Fiftyville solution... *Please just take a look if you couldn't solve it ... Thank you 🙂 #cs50
-- Keep a log of any SQL queries you execute as you solve the mystery.
-- Get descriptions of the crimes that happened in 28-July(7)-2020 in the Chamberlin St.
SELECT description FROM crime_scene_reports WHERE day = "28" AND month = "7" AND year = "2020" AND street = "Chamberlin Street";
-- Check the transcript of the theft date interviews mentioned by the courthouse.
SELECT transcript FROM interviews WHERE day = "28" AND month = "7" AND year = "2020" AND transcript like "%courthouse%";
-- Based on transcript of the first interview: Finding the names of the people who exit the courthouse 10 minutes after the theft.
SELECT name FROM people JOIN courthouse_security_logs ON people.license_plate = courthouse_security_logs.license_plate WHERE day = "28" AND month = "7" AND year = "2020" AND hour = "10" AND minute >= "15" AND minute < "25" AND activity = "exit";
@afternoon
afternoon / rename_js_files.sh
Created February 15, 2014 18:04
Rename .js files to .ts
find app/src -name "*.js" -exec sh -c 'mv "$0" "${0%.js}.ts"' {} \;