Skip to content

Instantly share code, notes, and snippets.

View Artistan's full-sized avatar

Charles Peterson Artistan

View GitHub Profile
@Artistan
Artistan / dabblet.css
Last active August 29, 2015 14:15
Generate repeating hexagonal pattern with CSS3 (SO) - 1 element/ hexagon !!!
/**
* Generate repeating hexagonal pattern with CSS3 (SO) - 1 element/ hexagon !!!
* http://stackoverflow.com/q/10062887/1397351
*/
* { box-sizing: border-box; margin: 0; padding: 0; }
.row:first-child { margin-top: 0%; }
.hexagon {
position: relative;
display: inline-block;
overflow: hidden;
@Artistan
Artistan / readme.md
Last active August 29, 2015 14:17 — forked from ashrithr/readme.md

Installing ELK (CentOS)

This is a short step-by-step guide on installing ElasticSearch LogStash and Kibana Stack on a CentOS environment to gather and analyze logs.

I. Install JDK

rpm -ivh https://dl.dropboxusercontent.com/u/5756075/jdk-7u45-linux-x64.rpm
@Artistan
Artistan / readme.md
Last active August 29, 2015 14:17 — forked from ashrithr/readme.md

Installing ELK (CentOS)

This is a short step-by-step guide on installing ElasticSearch LogStash and Kibana Stack on a CentOS environment to gather and analyze logs.

I. Install JDK

rpm -ivh https://dl.dropboxusercontent.com/u/5756075/jdk-7u45-linux-x64.rpm
@Artistan
Artistan / vpnsetup.sh
Last active August 29, 2015 14:26 — forked from hwdsl2/.MOVED.md
IPsec L2TP VPN Auto Install Script for Ubuntu 14.04 & 12.04 and Debian 8 & 7
#!/bin/sh
#
# Amazon EC2 user-data file for automatic configuration of IPsec/L2TP VPN server
# on a Ubuntu or Debian instance. Tested with Ubuntu 14.04 & 12.04 and Debian 8 & 7.
# With minor modifications, this script *can also be used* on dedicated servers
# or any KVM- or XEN-based Virtual Private Server (VPS) from other providers.
#
# DO NOT RUN THIS SCRIPT ON YOUR PC OR MAC! THIS IS MEANT TO BE RUN WHEN
# YOUR AMAZON EC2 INSTANCE STARTS!
#
@Artistan
Artistan / waitForKeyElements.js
Last active September 10, 2015 13:27 — forked from BrockA/waitForKeyElements.js
A utility function, for Greasemonkey scripts, that detects and handles AJAXed content.
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts,
that detects and handles AJAXed content.
Usage example:
waitForKeyElements (
"div.comments"
, commentCallbackFunction
);
@Artistan
Artistan / CLI.class.php
Created September 24, 2015 17:45 — forked from moiaune/CLI.class.php
Simple IO class for php CLI.
/*
* Description: Simple IO class for php CLI
* Author: Mads Aune
*/
if(!defined("STDIN")) { define('STDIN', fopen('php://stdin', 'r')); }
class CLI {
public static function getLine($prompt = '') {
echo $prompt . "> ";
@Artistan
Artistan / bootstrapCDN.html
Created February 17, 2016 01:50 — forked from planetoftheweb/bootstrapCDN.html
Bootstrap 3 CDN Page Code
<!-- HEAD SECTION -->
<!-- IE Edge Meta Tag -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Viewport -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
@Artistan
Artistan / 1. jquery.ejax-query-datatables.js
Last active March 8, 2016 18:41
elastic search datatables query
/*! Ejax Datatables - v0.0.1 - 2016-02-19
* Copyright (c) 2016 charles peterson; Licensed MIT */
(function ($) {
/**
* debug_ejax = console.log alot of crap
* elastic_json = the query for elastic
* pkey = key to define the object data structure if y`ant to
* serverUrl = elasticsearch server search path
* callbackSearch = callback to change the search for your elastic_json based on databases search updates made by the user
* callbackRow = callback to modify result row
var location_timeout = setTimeout(function () {
navigator.geolocation.clearWatch(WatchID);
self.findLocationByIP(callback);
}, 15000);
var WatchID = navigator.geolocation.watchPosition(
function (position) { // Success callback
clearTimeout(location_timeout);
/**
*
* jquery.binarytransport.js
*
* @description. jQuery ajax transport for making binary data type requests.
* @version 1.0
* @author Henry Algus <henryalgus@gmail.com>
*
*/