Skip to content

Instantly share code, notes, and snippets.

View kenhowardpdx's full-sized avatar

Ken Howard kenhowardpdx

View GitHub Profile
@kenhowardpdx
kenhowardpdx / WordPress Google Analytics
Last active April 5, 2023 18:00
Add Google Analytics to WordPress Theme functions.php
function init_analytics() {
$analytics = '<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push([\'_setAccount\', \'UA-XXXXXXXX-X\']);
_gaq.push([\'_trackPageview\']);
(function() {
var ga = document.createElement(\'script\'); ga.type = \'text/javascript\'; ga.async = true;
ga.src = (\'https:\' == document.location.protocol ? \'https://\' : \'http://\') + \'stats.g.doubleclick.net/dc.js\';
@kenhowardpdx
kenhowardpdx / README.markdown
Last active November 5, 2021 08:09
sharelink.js - Share Links on Social Networks
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
We couldn’t find that file to show.
.prettierrc.json
jest.config.js
tsconfig.json
tslint.json
src
examples
.vscode
__mocks__
foo
We couldn’t find that file to show.
import { env } from 'vscode';
import { GISTS_BASE_URL, GISTS_PER_PAGE } from '../constants';
import { gists } from './gists-service';
interface GistFile {
content: string;
filename: string;
language: string;
@kenhowardpdx
kenhowardpdx / bookmarklet-example.markdown
Last active January 11, 2020 10:12
Bookmarklet Example