Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset='utf-8' />
<meta http-equiv='X-UA-Compatible' content='IE=edge' />
<link
export function init() {
const cf = initialize('9bc8ccb3-f290-4767-87d7-f7aa70efe497', {
identifier: 'chris_prod',
});
cf.on(Event.READY, (flags) => {
console.log('*** READY: List of flags -', flags);
});
@chrisblakely01
chrisblakely01 / styles.css
Created August 3, 2020 10:34
CSS for temperature control app
body {
font-family: sans-serif;
text-align: center;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
min-height: 100vh;
}
@chrisblakely01
chrisblakely01 / getting-started-with-react-styles.css
Created July 23, 2020 07:55
CSS for Getting Started with React course
.contact-card {
display: flex;
padding: 10px;
color: #ffffff;
background-color: rgb(42, 84, 104);
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
box-shadow: 10px 10px 25px -16px rgba(0, 0, 0, 0.75);
border-radius: 10px;
max-width: 500px;
max-height: 125px;
@chrisblakely01
chrisblakely01 / temp-control-styles.css
Last active July 23, 2020 07:53
temp-control-css
body {
font-family: sans-serif;
text-align: center;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
min-height: 100vh;
}
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>My super awesome number app</title>
<meta name="description" content="The HTML5 Herald">
<meta name="author" content="SitePoint">
function addNumbers(number1, number2)
{
const result = number1 + number2;
const output = 'The result is ' + result;
console.log(output);
}
// this function substracts 2 numbers
function substractNumbers(number1, number2){
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:2.0.3.RELEASE")
}
}
@chrisblakely01
chrisblakely01 / batchDeleteUsingJdbcTemplate.java
Created March 26, 2018 11:40
Batch delete using JDBC template in Java
String sqlQuery = "delete from canned_message where msg_no in (:msgNos)";
List<Integer> params = <array list of number>;
Map namedParameters = Collections.singletonMap("msgNos", params);
int rows = smsdbJdbcTemplate.update(sqlQuery, namedParameters);
@chrisblakely01
chrisblakely01 / OnClickListenerToRecyclerViewItem.kt
Created March 22, 2018 20:40
Adding an onclick listener to a recyclerview item
override fun onBindViewHolder(holder: MyViewHolder, position: Int) {
val category = categoryList[position]
// Set height of cardview based on screen width
val displayMetrics = context.resources.displayMetrics
val finalHeight = displayMetrics.widthPixels / 2
holder.cardView.layoutParams.height = finalHeight
holder.categoryName.text = category.oc
holder.categoryPhoto.loadUrl(category.icon)