Skip to content

Instantly share code, notes, and snippets.

Ben Gardner unshift

Block or report user

Report or block unshift

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View install-elasticsearch.sh
#!/usr/bin/env bash
rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
curl -o /etc/yum.repos.d/elasticsearch.repo https://gist.githubusercontent.com/unshift/54c4eed278fca283ce71efb24a652885/raw/d1d4efbbae526f8546fc3abcda8fadbe185f45d7/elasticsearch.repo
yum install elasticsearch
yum install kibana
chkconfig --add elasticsearch
chkconfig --add kibana
View elasticsearch.repo
[elasticsearch-7.x]
name=Elasticsearch repository for 7.x packages
baseurl=https://artifacts.elastic.co/packages/7.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md
View kibana_api.js
const fetch = require('node-fetch')
const AUTH_TOKEN = ''
const HOST = ''
const KIBANA_ENDPOINT = '${HOST}/elasticsearch/_msearch?rest_total_hits_as_int=true&ignore_throttled=true'
const preamble = `{"index":"*","ignore_unavailable":true,"preference":1561797618673}`
const payload = {
View chrome-data-export.go
package main
import (
"encoding/json"
"fmt"
"io"
"log"
"math/rand"
"os"
"os/exec"
View dse.conf
# Template for a Spark Job Server configuration file
# When deployed these settings are loaded when job server starts
#
# Spark Cluster / Job Server configuration
spark {
# Spark Master will be automatically learned via the DSE
# spark.master will be passed to each job's JobContext
# master = "local[4]"
# master = "mesos://vm28-hulk-pub:5050"
# master = "yarn-client"
View install-docker.sh
#!/usr/bin/env bash
sudo yum update -y
sudo amazon-linux-extras install docker
sudo service docker start
sudo usermod -a -G docker ec2-user
docker info
View example.js
const foo = {}
export default foo
foo.bar = 3
View wand.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View LICENSE.md

MIT License

Copyright (c) 2017-present Ben Gardner

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

View launch.js
const chromeLauncher = require('chrome-launcher')
const DEFAULT_ARGS = [
'--disable-background-networking',
'--disable-background-timer-throttling',
'--disable-breakpad',
'--disable-client-side-phishing-detection',
'--disable-default-apps',
'--disable-dev-shm-usage',
'--disable-extensions',
You can’t perform that action at this time.