Skip to content

Instantly share code, notes, and snippets.

View saivarunk's full-sized avatar
💭
drowned into k8s

Varun Kruthiventi saivarunk

💭
drowned into k8s
View GitHub Profile
//* Modify the comment link text in comments
add_filter( 'genesis_post_info', 'sv_post_info_filter' );
function sv_post_info_filter( $post_info ) {
return '[post_comments zero="Leave a Comment" one="1 Comment" more="% Comments"]';
}
//* Remove comment form allowed tags
add_filter( 'comment_form_defaults', 'sv_remove_comment_form_allowed_tags' );
function sv_remove_comment_form_allowed_tags( $defaults ) {
$defaults['comment_notes_after'] = '';
return $defaults;
}
//* Add a comment policy box in comments
add_action( 'genesis_after_comments', 'sv_comment_policy' );
function sv_comment_policy() {
if ( is_single() && !is_user_logged_in() && comments_open() ) {
?>
<div class="comment-policy-box">
<p class="comment-policy"><small><strong>Comment Policy:</strong>All the comments and approved upon verification</small></p>
</div>
<?php
//* Customize the submit button text in comments
add_filter( 'comment_form_defaults', 'sv_comment_submit_button' );
function sv_comment_submit_button( $defaults ) {
$defaults['label_submit'] = __( 'Submit', 'custom' );
return $defaults;
}
//* Modify the size of the Gravatar in comments
add_filter( 'genesis_comment_list_args', 'sv_comments_gravatar' );
function sv_comments_gravatar( $args ) {
$args['avatar_size'] = 96;
return $args;
}
//* Modify the speak your mind title in comments
add_filter( 'comment_form_defaults', 'sv_comment_form_defaults' );
function sv_comment_form_defaults( $defaults ) {
$defaults['title_reply'] = __( 'Comments' );
return $defaults;
}
<html>
<head>
<title>Angular 2 First App</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="styles.css">
<!-- 1. Load libraries -->
<!-- Polyfill(s) for older browsers -->
<script src="node_modules/core-js/client/shim.min.js"></script>
<script src="node_modules/zone.js/dist/zone.js"></script>
@saivarunk
saivarunk / angularjs-providers-explained.md
Created September 2, 2016 06:52 — forked from demisx/angularjs-providers-explained.md
AngularJS Providers: Constant/Value/Service/Factory/Decorator/Provider
Provider Singleton Instantiable Configurable
Constant Yes No No
Value Yes No No
Service Yes No No
Factory Yes Yes No
Decorator Yes No? No
Provider Yes Yes Yes

Constant

@saivarunk
saivarunk / h20automl.r
Created October 1, 2017 21:31
H2O Auto ML Starter
library(data.table)
library(h2o)
# Load train and properties data
properties <- fread("../input/properties_2016.csv", header=TRUE, stringsAsFactors=FALSE, colClasses = list(character = 50))
train <- fread("../input/train_2016_v2.csv")
training <- merge(properties, train, by="parcelid",all.y=TRUE)
# Initialise h20
@saivarunk
saivarunk / cuda_9.0_cudnn_7.0.sh
Created April 3, 2018 07:07 — forked from ashokpant/cuda_9.0_cudnn_7.0.sh
Install CUDA Toolkit v9.0 and cuDNN v7.0 on Ubuntu 16.04
#!/bin/bash
# install CUDA Toolkit v9.0
# instructions from https://developer.nvidia.com/cuda-downloads (linux -> x86_64 -> Ubuntu -> 16.04 -> deb)
CUDA_REPO_PKG="cuda-repo-ubuntu1604-9-0-local_9.0.176-1_amd64-deb"
wget https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/${CUDA_REPO_PKG}
sudo dpkg -i ${CUDA_REPO_PKG}
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
sudo apt-get update
sudo apt-get -y install cuda