- link to a definition with minaswan(good for SEO and readability)
- be careful about conflating ruby and rails(it's basically the same thing in use but not techincally the same project so just be careful about phrasing)
- 2nd to last paragraph: i would focus on how machines today are powerful enough that we can spare a few cycles here and there instead of on the scale of modern webapps.
- i'd like to see an example of what rails makes super simple/what's opinionated about it
- i'd also like to see numbers on speed but that might not be the focus of this article
- https://c1.staticflickr.com/1/7/8013829_1eaef1f51f.jpg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;(function () { | |
'use strict' | |
// *** manipulating an image in the browser *** | |
var file_input, file_reader, image_data, canvas, text_input, converted_canvas_data | |
// user visits page | |
console.log('hello and welcome to the quote image generator') | |
// user sees a text input | |
text_input = document.createElement('input') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
'use strict' | |
/** | |
* @module Twerkify | |
* @description Thank you for twerking. Use at your own risk. | |
*/ | |
console.log('Thank you for twerking') | |
var json_request |
I need for you to build the front end to our new user management system. The first component in this system is a dashboard that lists all of our current users.
Criteria:
- This site is going to be run as strictly static pages that interact with APIs so no backend is necessary.
- The API isn't available yet so you'll need to fake some data. Use randomuser.me to get a set of users.
- Use jQuery to facilitate browser abstraction.
- Fetch a set of 3 male users and list them on the page.
- Put their avatar on the left and their name, username, and email address on the right.
- check out feross/standard for some javascript style advice and a plugin to autocorrect violations
- never be afraid to write variables with long fuckall names. readability is more important than shorthand
- always wrap code in an IIFE to prevent global namespace pollution
- good job on the wordSubstituter method
- bulkShortener: i'd prefer a map/forEach to a for loop
- if this were in my codebase i'd make you write inline documentation but that's fine here
- triple extra bonus points if you rewrote this in a more class-based manner like:
class Tweet {
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# @description outputs lines and the files they came from to an arbitrary file | |
# @argument input {String} - regex looking for files in local directory | |
# @argument output {Filename} - where to echo found lines to | |
# @argument searchstring {String} - what to match for | |
# @example - ./search.sh '*.csv' outputfile.csv portuguese | |
echo $1 | |
for file in $1; do | |
echo "Examining $file" |
Revised date: 07/11/2012
Between us [company name] and you [customer name]
We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
$('#format-me').on('keydown', function (event) { | |
var text = event.target.value | |
var regex = /^\(\d{3}\)\s\d{3}-\d{4}$/ | |
// if it's valid do nothing | |
if (regex.test(text)) { return } | |
// strip the input down to numbers only | |
text = text.replace(/\D/g, '') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
(() => { | |
'use strict' | |
let styles = ` | |
.pretty-broken-image { | |
visibility: hidden; | |
position: relative; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Order of operations: | |
user clicks on button within a slideshow | |
button emits a 'click' event | |
slideshow catches button click event | |
slideshow handles the specified action (change the slide to the right) | |
slideshow emits a 'slide_changed' event | |
click gallery, acting as a controller/higher-level wrapper for the slideshow in this case catches the slide changed event | |
click gallery tells the advertisement to update | |
advertisement runs an update |
OlderNewer