Skip to content

Instantly share code, notes, and snippets.

@DalavanCloud
DalavanCloud / centos_python_env_setup
Created December 14, 2018 21:54 — forked from cbowers/centos_python_env_setup
Script for setting up Python virtual environment on Centos
#!/bin/bash
# Install stuff #
#################
# Install development tools and some misc. necessary packages
yum -y groupinstall "Development tools"
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel mysql-devel libxml2-devel libxslt-devel unixODBC-devel sqlite sqlite-devel -y
# Alias shasum to == sha1sum (will prevent some people's scripts from breaking)
@DalavanCloud
DalavanCloud / footgun.md
Created February 22, 2019 04:50 — forked from Rich-Harris/footgun.md
Top-level `await` is a footgun
@DalavanCloud
DalavanCloud / module-loading.md
Created February 22, 2019 04:51 — forked from Rich-Harris/module-loading.md
Dynamic module loading done right

Dynamic module loading done right

Follow-up to Top-level await is a footgun – maybe read that first

Here are some things I believe to be true:

  1. Static module syntax is beneficial in lots of ways – code is easier to write (you get better linting etc) and easier to optimise (tree-shaking and other things that are only really possible with static syntax), and most importantly, faster to load (it's trivial for a module loader to load multiple dependencies concurrently when they're declared with a static syntax – not so with imperative statements like require(...) or await import(...)).
  2. App startup time is perhaps when performance is most critical. (You already know this, I don't need to cite the studies.)
  3. If you're in favour of constructs that jeopardise app startup time, you are anti-user. Top-level await is such a construct.
@DalavanCloud
DalavanCloud / custom_extender_pro_not_labeled.php
Created March 7, 2019 01:55 — forked from cobaltapps/custom_extender_pro_not_labeled.php
A custom version of the extender_pro_has_label function that checks if pages/posts have any labels assigned to them.
function custom_extender_pro_not_labeled() {
if ( is_singular() && get_post_meta( get_the_ID(), '_extender_pro_' . extender_pro_sanitize_string( extender_pro_active_theme_name(), true ) . '_labels', true ) == '' )
return true;
else
return false;
}
@DalavanCloud
DalavanCloud / dynamik-impact-skin-demo-setup.php
Created March 7, 2019 01:56 — forked from cobaltapps/dynamik-impact-skin-demo-setup.php
Demo Setup Instructions and Content for the Dynamik Impact Skin.
<?php
/**
* Below you will find all of the custom content used to
* create the demo site for the Dynamik Impact Skin.
*/
?>
WordPress Menu Setup: Assign a menu to the "Primary Navigation Menu".
== BEGIN Widget Area Info ==
@DalavanCloud
DalavanCloud / dynamik-parallax-skin-demo-setup.php
Created March 7, 2019 01:56 — forked from cobaltapps/dynamik-parallax-skin-demo-setup.php
Demo Setup Instructions and Content for the Dynamik Parallax Skin.
<?php
/**
* Below you will find all of the custom content used to
* create the demo site for the Dynamik Parallax Skin.
*/
?>
WordPress Menu Setup: Assign a menu to the "Primary Navigation Menu" as well as the Genesis "Header Right" Widget Area as stated below.
== BEGIN Widget Area Info ==
@DalavanCloud
DalavanCloud / dynamik-nonprofit-skin-demo-setup.php
Created March 7, 2019 01:57 — forked from cobaltapps/dynamik-nonprofit-skin-demo-setup.php
Demo Setup Instructions and Content for the Dynamik NonProfit Skin.
<?php
/**
* Below you will find all of the custom content used to
* create the demo site for the Dynamik NonProfit Skin.
*/
?>
WordPress Menu Setup: Assign a menu to the "Primary Navigation Menu" as well as the Genesis "Header Right" Widget Area as stated below.
== BEGIN Widget Area Info ==
@DalavanCloud
DalavanCloud / dynamik-themeshop-skin-demo-setup.php
Created March 7, 2019 01:57 — forked from cobaltapps/dynamik-themeshop-skin-demo-setup.php
Demo Setup Instructions and Content for the Dynamik ThemeShop Skin.
<?php
/**
* Below you will find all of the custom content used to
* create the demo site for the Dynamik ThemeShop Skin.
*/
?>
WordPress Menu Setup: Assign a menu to the "Primary Navigation Menu" as well as the "Secondary Navigation Menu".
== BEGIN Widget Area Info ==
@DalavanCloud
DalavanCloud / dynamik-realestate-skin-demo-setup.php
Created March 7, 2019 01:57 — forked from cobaltapps/dynamik-realestate-skin-demo-setup.php
Demo Setup Instructions and Content for the Dynamik RealEstate Skin.
<?php
/**
* Below you will find all of the custom content used to
* create the demo site for the Dynamik RealEstate Skin.
*/
?>
WordPress Menu Setup: Assign a menu to the "Primary Navigation Menu" as well as the Genesis "Header Right" Widget Area as stated below.
== BEGIN Widget Area Info ==
@DalavanCloud
DalavanCloud / dynamik-vitality-skin-demo-setup.php
Created March 7, 2019 01:58 — forked from cobaltapps/dynamik-vitality-skin-demo-setup.php
Demo Setup Instructions and Content for the Dynamik Vitality Skin.
<?php
/**
* Below you will find all of the custom content used to
* create the demo site for the Dynamik Vitality Skin.
*/
?>
WordPress Menu Setup: Assign a menu to the "Primary Navigation Menu".
== BEGIN Widget Area Info ==