Skip to content

Instantly share code, notes, and snippets.

View ciccarone's full-sized avatar
:octocat:

Tony Ciccarone ciccarone

:octocat:
View GitHub Profile
@ciccarone
ciccarone / html5_template.html
Created May 1, 2016 23:31 — forked from nathansmith/html5_template.html
Simple HTML5 Template
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge, chrome=1" />
<title>untitled</title>
<link rel="stylesheet" href="" />
</head>
<body>
@ciccarone
ciccarone / index.html
Created February 16, 2018 19:15
WebGL Particles
<canvas id="canvas"></div>
<script id="vertex-shader" type="x-shader/x-vertex">
attribute vec2 a_position;
void main(void) {
gl_Position = vec4(a_position, 0, 1);
}
</script>
<script id="fragment-shader" type="x-shader/x-fragment">
#ifdef GL_ES
$black: #050507;
$blue: #D1FFFF;
$yellow: #FFF2C6;
body {
background-color: $black;
}
.download {
@ciccarone
ciccarone / wp-hierarchical-taxonomy.php
Last active April 5, 2023 11:12
Programmatically add hierarchical taxonomies in Wordpress
$taxonomy_term = 'example';
$related_terms = array(
__( 'Parent' ) => array(
__( 'Child 1' ),
__( 'Child 2' ),
),
__( 'Parent 2') => array(
__( 'Child 3' ),
__( 'Child 4' ),
@ciccarone
ciccarone / WordPress function to automatically add ALT tags to images on upload
Last active April 5, 2023 11:13
Automatically add ALT tags to images uploaded to Wordpress media library based off of the file name.
// WordPress function to automatically
// add ALT tags to images on upload.
function alt_tag_adder( $post_ID ) {
if ( wp_attachment_is_image( $post_ID ) ) {
$tc_title = get_post( $post_ID )->post_title;
$tc_title = preg_replace( '%\s*[-_\s]+\s*%', ' ', $tc_title );
$tc_title = ucwords( strtolower( $tc_title ) );
$tc_meta = array(
'ID' => $post_ID,
php artisan create:resources Post --with-migration;
@ciccarone
ciccarone / Reddit: Post Bot
Created May 4, 2019 20:41
Been learning some python, here is a bot that posts to reddit using praw
import praw
import re
import time
reddit = praw.Reddit(
client_id='',
client_secret='Y',
user_agent='<console:testbot:0.0.1>',
username='',
password=''
@ciccarone
ciccarone / GTM UTM Link Click Data Variable
Created October 18, 2019 01:28
GTM UTM Link Click Data Variable
export PATH=/usr/local/php5/bin:$PATH
php artisan migrate:refresh; php artisan migrate:reset; php artisan migrate;