Skip to content

Instantly share code, notes, and snippets.

View capitalJT's full-sized avatar

Jabal Torres capitalJT

View GitHub Profile
@capitalJT
capitalJT / jt-data.json
Last active October 8, 2019 02:55
This is being used in web fun
{
"thumbnails": [
{ "client" : "Digital Meaning",
"description" : "Digital Meaning",
"role": "UI Design, Web Development",
"imgSrc" : "https://jabaltorres.com/assets/img/thumbnails/Digital-Meaning-thumbnail.png",
"linkHref" : "https://www.jabaltorres.com/digital-meaning/",
"extLink" : false
},
<?php
// JT Test - being used on demos/forms/forms.php
function validate_jt_test_form($jtMessage) {
$errors = [];
if(is_blank($jtMessage['name'])) {
$errors[] = "Name cannot be blank.";
} elseif(!has_length($jtMessage['name'], ['min' => 2, 'max' => 255])) {
$errors[] = "Name must be between 2 and 255 characters.";
}
@capitalJT
capitalJT / react-gist.html
Created April 16, 2019 05:36
Basic React.js gist from the React documentation
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Hello World</title>
<script src="https://unpkg.com/react@16/umd/react.development.js"></script>
<script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
<!-- Don't use this in production: -->
<script src="https://unpkg.com/babel-standalone@6.15.0/babel.min.js"></script>
@capitalJT
capitalJT / wp-display-image-captions.php
Created February 24, 2019 04:07
Display WP featured image captions and descriptions
<?php
/* Only display to logged in users */
if ( is_user_logged_in() ) {
/* Displaying the image caption and description */
$thumb_img = get_post( get_post_thumbnail_id() ); // Get post by ID
echo '<p>The Caption: ' . $thumb_img->post_excerpt . '<br>'; // Display Caption
echo 'The Description: ' . $thumb_img->post_content . '</p> '; // Display Description
/* Displaying the image alt text */
@capitalJT
capitalJT / wp-display-categories.php
Created February 24, 2019 03:55
How to display wordpress categories
<?php
// How to display categories
$args = array(
'taxonomy' => 'test',
'orderby' => 'name',
'order' => 'ASC'
);
$cats = get_categories($args);
@capitalJT
capitalJT / basic-html-index-template.html
Created January 24, 2019 04:07
Basic HTML Index Template
<!DOCTYPE html>
<html>
<head>
<title>Basic HTML Template</title>
<link rel="stylesheet" href="css/styles.css">
</head>
<body>
<h1>Hello World!</h1>
</body>
</html>
@capitalJT
capitalJT / windows-commands.md
Last active January 19, 2019 18:47
List of windows commands
Command Decription
call calls a batch file from another one
cd change directory
cls clear screen
cmd start command prompt
color change console color
date show/set date
dir list directory content
echo text output
@capitalJT
capitalJT / lorem-grid.scss
Created February 27, 2018 06:17
Custom gird for wordpress development
.grid-container {
width :100%;
max-width: 1240px;
}
.grid-container {
box-sizing: border-box;
/*-- our cleafix hack -- */
.row:before,
.row:after {

Quick Command Reference

git add .
git git commit -m "init commit"
git remote add origin https://github.com/capitalJT/new-repo.git
git push origin master

Setup