Skip to content

Instantly share code, notes, and snippets.

@sguzik
sguzik / covid_dates.csv
Created January 25, 2022 16:56
Key dats for COVID in NYC
i date covid_development
1 3/1/20 First COVID date
2 3/7/20 State of Emergency
3 3/12/20 Broadway shutsdown
4 3/14/20 First COVID death in NYS
5 3/16/20 Schools go remote
6 3/17/20 NYC Restaurants close
7 4/6/20 School closure extended
8 5/1/20 School closure extended
9 5/14/20 State of Emergency extended
@sguzik
sguzik / holidays.csv
Last active January 25, 2022 16:46
List of holidays for GA forecasting news traffic, forked from https://github.com/jroakes/google-analytics/blob/master/examples/holidays.csv
i date holiday
1 1/1/18 New Year Day
2 1/15/18 Martin Luther King Jr. Day
3 2/19/18 Presidents Day (Washingtons Birthday)
4 5/28/18 Memorial Day
5 7/4/18 Independence Day
6 9/3/18 Labor Day
7 10/8/18 Columbus Day
8 11/6/18 Mid-term Election Day
9 11/12/18 Veterans Day
@sguzik
sguzik / keybase.md
Created April 26, 2017 14:58
Keybase proof

Keybase proof

I hereby claim:

  • I am sguzik on github.
  • I am sguzik (https://keybase.io/sguzik) on keybase.
  • I have a public key whose fingerprint is 76C2 CF38 3410 B2C5 E9E9 2193 BC87 8D8D C64A EA68

To claim this, I am signing this object:

@sguzik
sguzik / README.md
Last active December 29, 2015 01:09 — forked from mbostock/.block

The tree layout implements the Reingold-Tilford algorithm for efficient, tidy arrangement of layered nodes. The depth of nodes is computed by distance from the root, leading to a ragged appearance. Cartesian orientations are also supported. Implementation based on work by Jeff Heer and Jason Davies using Buchheim et al.'s linear-time variant of the Reingold-Tilford algorithm. Data shows the Flare class hierarchy, also courtesy Jeff Heer.

@sguzik
sguzik / gist:2638491
Created May 8, 2012 18:56
HTML/PHP for menu
<div class="navbar">
<div class="navbar-inner">
<div class="container">
<a class="brand" href="<?php echo home_url( '/' ); ?>"><?php bloginfo('name'); ?></a>
<?php
/** Loading WordPress Custom Menu with Fallback to wp_list_pages **/
wp_nav_menu( array( 'menu' => 'main-menu', 'container_class' => 'nav-collapse', 'menu_class' => 'nav', 'menu_id' => 'main-menu') ); ?>
</div>
</div><!-- /navbar-inner -->
</div> <!-- end of .navbar -->
@sguzik
sguzik / gist:2638389
Created May 8, 2012 18:42
Making widgets work
function theme_widgets_init() {
register_sidebar( array(
'name' => 'Page Sidebar',
'id' => 'sidebar-page',
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => "</div>",
'before_title' => '<h4 class="widget-title">',
'after_title' => '</h4>',
) );
}
@sguzik
sguzik / gist:2638364
Created May 8, 2012 18:40
Add this to functions.php to get your menus working
/*
| -------------------------------------------------------------------
| Registering Top Navigation Bar
| -------------------------------------------------------------------
| Adds custom menu with wp_page_menu fallback
| */
if ( function_exists( 'register_nav_menu' ) ) {
register_nav_menu( 'main-menu', 'Main Menu' );
}
@sguzik
sguzik / gist:2638352
Created May 8, 2012 18:39
CSS For menus
.navbar ul {
position: relative;
left: 0;
display: block;
float: left;
margin: 10px 10px 0 0;
}
.navbar ul li {
display: block;
@sguzik
sguzik / gist:2569959
Created May 1, 2012 17:43
Add thumbnails to our index page
<?php
if ( has_post_thumbnail() ) {
the_post_thumbnail();
}
?>
@sguzik
sguzik / gist:2569950
Created May 1, 2012 17:42
Stuff to put in functions.php
<?php
/* this line automatically adds RSS feed links to your site header
add_theme_support( 'automatic-feed-links' );
/* this line allows your theme to take advantage of the WordPress thumbnail feature
add_theme_support( 'post-thumbnails' );
?>