Skip to content

Instantly share code, notes, and snippets.

View sidharrell's full-sized avatar

Sidney Harrell sidharrell

  • Vivian-Harrell Web Development Studios, LLC
  • Harpers Ferry, WV, United States
View GitHub Profile
@sidharrell
sidharrell / ball.html
Last active April 11, 2019 04:56
d3 bouncing ball
<!DOCTYPE html>
<meta charset="utf-8">
<title>D3 test</title>
<script src="https://d3js.org/d3.v5.min.js"></script>
<body>
</body>
<script>
var acceleration = {"ddx": 0, "ddy": -10};
var circleData = [
{"x": 0, "y": 0, "dx": 50, "dy": 100, "r": 10, "fill": "red", "index": 1},
podman run -p 8200:8200 \
-v apm-server.yml:/usr/share/apm-server/apm-server.yml \
docker.elastic.co/apm/apm-server-oss:6.5.4
podman run -p 5000:5000 \
-e "ES_JAVA_OPTS=-Xms256m -Xmx256m" \
-v logstash.yml:/usr/share/logstash/config/logstash.yml \
docker.elastic.co/logstash/logstash-oss:6.5.4
podman run -p 5601:5601 \
ansible
jenkins
bitbucket
confluence
jira
op5
idm
elk
@sidharrell
sidharrell / gist:5ebbb3ec43ddb85c63ae719a23c99cb0
Last active March 21, 2018 05:43
d3 line chart sever side with node
var fs = require('fs');
var d3 = require('d3');
var jsdom = require('jsdom');
module.exports = function(outputLocation, graphTitle) {
if (!outputLocation)
outputLocation = 'test.svg';
if (!graphTitle)
@sidharrell
sidharrell / gist:8831cae292d2ceef0ad6c14df1a97559
Created December 7, 2017 09:01
filter the cruft from /var/log/secure
grep -vE "sshd.*Disconnected\ from" secure | \
grep -vE "sshd.*Received\ disconnect" | \
grep -vE "sshd.*invalid\ user" | \
grep -vE "sshd.*Invalid\ user" | \
grep -vE "sshd.*Connection\ closed" | \
grep -vE "sshd.*Disconnecting" | \
grep -vE "sshd.*maximum\ authentication\ attempts" | \
grep -vE "sshd.*reverse\ mapping\ checking" | \
grep -vE "sshd.*Did\ not\ receive\ identification\ string" | \
grep -vE "sshd.*Address.*maps\ to.*but\ this\ does\ not\ map\ back\ to\ the\ address" | \
#!/bin/bash
## The ip address XXX.XXX.XXX.XXX/32 below needs to be replaced by the jump box address
## This locks down the server post-creation and sets it up with a 'sidney' user, since that is my local user, it makes it
## convenient to log in without the centos@
## also, I'm curling 404's from http://wiseyacht.com/ as my crude verification that it's finished, cause I can tail that
## apache log
useradd sidney
cp -r ~centos/.ssh ~sidney
chown -R sidney. ~sidney/.ssh
@sidharrell
sidharrell / setupd8
Last active March 21, 2016 10:29
setupd8.ubuntu
#!/bin/bash
# edits if using:
# current hostname: localhost
# this only affects the message output with the link to the new site, not any functionality
# current local git clone of Drupal 8: /home/$user/Development/drupal
# you will need to locally clone drupal 8. It's a lot more efficient on whatever hosts drupal's git repo.
# current OS: Ubuntu
# requires pwgen, drush, sed, awk, git
# requires the template at https://gist.github.com/sidharrell/47767f2bb468ec65a84d in /etc/apache2/sites-available/template
# requires a "127.0.0.1 *.localhost" in /etc/hosts to fix firefox problem
@sidharrell
sidharrell / gist:be2cc397ba2e6827fbab
Created March 15, 2016 10:22
minimum mysqld settings. /etc/my.cnf
[mysqld]
## General
ignore-db-dir = lost+found
datadir = /var/lib/mysql
socket = /var/lib/mysql/mysql.sock
tmpdir = /var/lib/mysqltmp
performance_schema=off
innodb_buffer_pool_size=5M
@sidharrell
sidharrell / template
Last active October 20, 2016 23:55
vhost template
<VirtualHost *:80>
ServerName XXXXXX.localhost
ServerAdmin webmaster@localhost
DocumentRoot /var/www/XXXXXX/htdocs
LogLevel warn
ErrorLog "|/sbin/cronolog /var/www/XXXXXX/logs/%Y/%m/%Y-%m-%d-error.log"
CustomLog "|/sbin/cronolog /var/www/XXXXXX/logs/%Y/%m/%Y-%m-%d-access.log" combined
<Directory /var/www/XXXXXX/htdocs/>
RewriteEngine on
RewriteBase /
@sidharrell
sidharrell / setupd8
Last active March 20, 2016 19:14 — forked from timplunkett/setupd8
Reinstall D8
#!/bin/bash
# edits if using:
# current hostname: dev01.vhwebdev.com
# this only affects the message output with the link to the new site, not any functionality
# current local git clone of Drupal 8: /home/$user/Development/drupal
# you will need to locally clone drupal 8. It's a lot more efficient on whatever hosts drupal's git repo.
# current OS: Centos6
# you would need to modify it to work on straight apache2 on Ubuntu, or make a symlink of /etc/httpd to /etc/apache2
# and modify the apache2 main conf file to pick up .conf files in /etc/httpd/conf.d/
# You will need to put https://gist.github.com/sidharrell/47767f2bb468ec65a84d , the template file,