Top HN posts
import boto3 | |
import certbot.main | |
import datetime | |
import os | |
import raven | |
import subprocess | |
def read_and_delete_file(path): | |
with open(path, 'r') as file: | |
contents = file.read() |
<?php | |
/********* CONFIG ********/ | |
$clusterEndpoint = ""; | |
$clusterPort = 3306; | |
$clusterRegion = "us-east-1"; | |
$dbUsername = ""; | |
$dbDatabase = ""; | |
/*************************/ |
# Copyright (C) 2016 Martina Pugliese | |
from boto3 import resource | |
from boto3.dynamodb.conditions import Key | |
# The boto3 dynamoDB resource | |
dynamodb_resource = resource('dynamodb') | |
def get_table_metadata(table_name): |
I fell in love with CoffeeScript a couple of years ago. Javascript has always seemed something of an interesting curiosity to me and I was happy to see the meteoric rise of Node.js, but coming from a background of Python I really preferred a cleaner syntax.
In any fast moving community it is inevitable that things will change, and so today we see a big shift toward ES6, the new version of Javascript. It incorporates a handful of the nicer features from CoffeeScript and is usable today through tools like Babel. Here are some of my thoughts and issues on moving away from CoffeeScript in favor of ES6.
While reading I suggest keeping open a tab to Babel's learning ES6 page. The examples there are great.
Holy punctuation, Batman! Say goodbye to your whitespace and hello to parenthesis, curly braces, and semicolons again. Even with the advanced ES6 syntax you'll find yourself writing a lot more punctuatio
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
<ul class="events"> | |
<?php | |
$paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1; | |
$atts = array( | |
'paged' => $paged, | |
'title' => NULL, | |
'limit' => 100, | |
'css_class' => NULL, | |
'show_expired' => FALSE, | |
'month' => NULL, |
<?php | |
if ( ! class_exists('WP_List_Table')) { | |
require_once(ABSPATH . 'wp-admin/includes/class-wp-list-table.php'); | |
} | |
class Events_List_Table extends WP_List_Table | |
{ | |
function __construct() | |
{ | |
global $status, $page; |