Skip to content

Instantly share code, notes, and snippets.

View nikibrown's full-sized avatar
💻
Looking for work!

Niki Brown nikibrown

💻
Looking for work!
View GitHub Profile
@nikibrown
nikibrown / takehome.md
Created September 3, 2019 19:16
Lisa Dawes's DATA-201 Technical Take Home

Name Lisa Dawes

Choose the SQL syntax option you learned about in the course. This is the syntax you'll be required to use in the take home exam. Postgres

Our database has 3 tables: transactions, products, and customers.

Using the sql file provided answer the following questions. You can assume that the sql file works properly. If you chose SQLite use https://bit.ly/2GEMY53 If you chose Postgres use https://bit.ly/2LsEJwm Create a query that returns the name of the most popular item in every state and the state.

<div class="nav--desktop">
<div class="mobile-wrapper">
<div class="header-cart__wrapper hidden-lg">
<a href="/cart" class="CartToggle header-cart"><i class="icon icon-ra_bag"></i></a>
<span class="header-cart__bubble cartCount has-items cartCount-updater hidden-count">0</span>
</div>
<div class="logo-wrapper ">
<h1 class="h4 header-logo" itemscope="" itemtype="http://schema.org/Organization">
@nikibrown
nikibrown / nodeValue-stuff.md
Created March 22, 2018 16:07
Node Value Stuff

childNodes, firstChild, and nodeValue - oh my!

first, let's look at childNodes. this property gives you a list of nodes that are direct children of the node the property is called on. here's an example. consider the following html and javascript:

<section>
    <div>
        <h1>hi there!</h1>
    </div>
@nikibrown
nikibrown / animatePoints.js
Created November 30, 2017 17:55
? about placement of for loop
// version 1
var animatePoints = function() {
var points = document.getElementsByClassName('point');
var revealPoint = function() {
// for loop is inside revealPoint function
for (var i = 0; i < points.length; i++) {
points[i].style.opacity = 1;
points[i].style.transform = "scaleX(1) translateY(0)";
@nikibrown
nikibrown / container.html
Created October 6, 2017 19:18
Containers in HTML/CSS
<html>
<head>
<style>
header,
footer {
background-color: #000;
color: white;
}
main {
test
@nikibrown
nikibrown / gist:a98e9f4e892b30a4457f
Last active March 6, 2021 20:52
Custom post type pagination
<?php
$custom_query_args = array (
'post_type' => 'news',
'posts_per_page' => '4'
);
$custom_query_args['paged'] = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1;
$custom_query = new WP_Query( $custom_query_args );
@nikibrown
nikibrown / gist:727b3add0a0e660706ec
Last active August 29, 2015 14:11
Combine Advanced Custom Fields Relationship field + google maps field
<?php $posts = get_field('featured_space'); if( $posts ): ?>
<div class="acf-map">
<?php foreach( $posts as $post): // variable must be called $post (IMPORTANT) ?>
<?php setup_postdata($post); ?>
<?php $space_address = get_field('space_address', $post->ID); ?>
<div class="marker" data-lat="<?php echo $space_address['lat']; ?>" data-lng="<?php echo $space_address['lng']; ?>">
<h4><?php the_title();?></h4>
<p><?php echo $space_address['address']; ?></p>
</div><!--/.marker-->
<?php endforeach; ?>
<?php
$args = array (
'post_type' => 'post',
'posts_per_page' => '-1',
);
$query = new WP_Query( $args );
if ( $query->have_posts() ) {
while ( $query->have_posts() ) {
esteWatch: {
options: {
dirs: ['assets/**/']
},
scss: function(filepath) {
grunt.log.writeln(filepath);
var files = [{
src: filepath,
ext: '.css'
}];