Skip to content

Instantly share code, notes, and snippets.

@augbog
augbog / .Frontend Technical Interview Prep.md
Last active June 12, 2024 21:16
Frontend Technical Interview Prep: A study guide of things I constantly re-review when interviewing for frontend.

Frontend Technical Interview Prep

EDIT: Well this has been linked now so just an FYI this is still TBD. Feel free to comment if you have suggestions for improvements. Also here is an unrolled Twitter thread of a lot of the tips I talk about on here.

I've been doing frontend for a while now and one thing that really gripes me is the interview. I think the breadth of knowledge of a "Frontend Engineer" has been so poorly defined that people really just expected you to know everything. Many companies have made this a hybrid role. The Web is massive and there are many MANY things to know. Some of these things are just facts that you learn and others are things you really have to understand.

Every time I interview, I go over the same stuff. I wanted to create a gist of the TL;DR things that would jog my memory and hopefully yours too.

Lots of these things are real things I've been asked that caught me off guard. It's nice to have something you ca

Strings

String.prototype.*

None of the string methods modify this – they always return fresh strings.

  • charAt(pos: number): string ES1

    Returns the character at index pos, as a string (JavaScript does not have a datatype for characters). str[i] is equivalent to str.charAt(i) and more concise (caveat: may not work on old engines).

@leopic
leopic / Gruntfile.js
Created August 7, 2015 19:14
make a list of all the stylesheets that need to be processed, then start cranking away
/**
* Generates our CSS files using libsass.
* Wrapper for the `sass` task, make sure you have installed all the dependencies of the repo.
*
* Example: $: grunt libsass
* $: grunt libsass:dev
*
* @param env
*/
grunt.registerTask('libsass', 'Builds our CSS', function(env) {
@rupl
rupl / gulpfile.js
Last active September 25, 2019 15:13
Sample Gulp setup. Watches JS to JSHint, watches two themes for Sass+Compass compilation.
/**
* @file
* Gulpfile that controls frontend development tasks. Just the basics!
*
* Installation: type `npm install` in your console.
* Usage: type `gulp` in your console.
*/
/* jslint node: true */
'use strict';
@leopic
leopic / inUrl.js
Created September 23, 2013 22:12
helper to retrieve url params
// Based off the work from https://github.com/mattpass
_.mixin({
inUrl: function(singleParam) {
var allParams = _.map(location.search.slice(1).split('&'), function(currentParam) {
return { 'Key': currentParam.split('=')[0],
'Value': decodeURIComponent(currentParam.split('=')[1]).replace(/\+/g,' '),
'Raw Value': currentParam.split('=')[1]
}
});
@gastongarcia
gastongarcia / Wordpress Loop Categories
Last active December 12, 2015 05:09
Wordpress Loop in Categories
<?php
//tomado directamente del Codex de Wordpress. Sección Ejemplos del Loop
//http://codex.wordpress.org/The_Loop#Loop_Examples
?>
<!-- Start the Loop. -->
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<!-- Test if the current post is in category 3. -->
<!-- If it is, the div box is given the CSS class "post-cat-three". -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Responsive Design Testing</title>
<style>
body { margin: 20px; font-family: sans-serif; overflow-x: scroll; }
.wrapper { width: 6000px; }
.frame { float: left; }
h2 { margin: 0 0 5px 0; }
@adactio
adactio / twitter-user-stylesheet.css
Created December 14, 2011 23:56
CSS rules to hide "Trending Topics" and "Who To Follow" on new new Twitter.
[data-component-term="trends"] *,
[data-component-term="user_recommendations"] * {
display: none !important;
}
@jacine
jacine / template.php
Created November 19, 2011 01:02
Bye, bye region.tpl.php and block--system--main.tpl.php
<?php
/**
* Implements hook_page_alter().
*/
function mytheme_page_alter(&$page) {
// Remove all the region wrappers.
foreach (element_children($page) as $key => $region) {
if (!empty($page[$region]['#theme_wrappers'])) {
$page[$region]['#theme_wrappers'] = array_diff($page[$region]['#theme_wrappers'], array('region'));
@simme
simme / Install_tmux
Created October 19, 2011 07:55
Install and configure tmux on Mac OS X
# First install tmux
brew install tmux
# For mouse support (for switching panes and windows)
# Only needed if you are using Terminal.app (iTerm has mouse support)
Install http://www.culater.net/software/SIMBL/SIMBL.php
Then install https://bitheap.org/mouseterm/
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/