Skip to content

Instantly share code, notes, and snippets.

Jake Bathman jakebathman

Block or report user

Report or block jakebathman

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
@jakebathman
jakebathman / groupMeApi.php
Last active Aug 28, 2015
GroupMe API post
View groupMeApi.php
public function apiPost($url, $data = array() , $boolHeaders = false)
{
$ch = curl_init($url);
if (empty($data['file']))
{
$data = json_encode($data);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Content-Length: ' . strlen($data)
));
@jakebathman
jakebathman / Auto-clicker for TheButton.md
Last active Aug 29, 2015
Auto-clicker for /r/TheButton
View Auto-clicker for TheButton.md

###AUTO BUTTON CLICKER

This little script will automatically click The Button (http://www.reddit.com/r/thebutton) when the timer goes below a certain time (set by the user as intClickUnderTime).

This will only run until you refresh the page or navigate away.

⚠️ ⚠️ ⚠️

REVIEW THIS CODE CAREFULLY.

@jakebathman
jakebathman / map.php
Last active Aug 29, 2015
Google Maps v3 basic example
View map.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<style>
html, body, #map-canvas {
height: 100%;
margin: 0px;
padding: 0px
@jakebathman
jakebathman / markov.php
Last active Aug 29, 2015 — forked from bmcculley/markov.php
PHP Markov Chain class
View markov.php
<?php
/*
Levi Thornton from boogybonbon and wordze generously posted his php Markov
Chain class.. unfortunately there is a missing $nn++ thus the class can hang,
the working version is below all credit to Levi for the code, i just fixed a
bug.
Example Usage:
------------------
View StringConcat.vbs
Function StringConcat(Sep As String, ParamArray Args()) As Variant
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' StringConcat
' By Chip Pearson, chip@cpearson.com, www.cpearson.com
' www.cpearson.com/Excel/stringconcatenation.aspx
' This function concatenates all the elements in the Args array,
' delimited by the Sep character, into a single string. This function
' can be used in an array formula. There is a VBA imposed limit that
' a string in a passed in array (e.g., calling this function from
' an array formula in a worksheet cell) must be less than 256 characters.
View regex.php
<?php
$arrRegexPatterns = array(
'subreddit' => "/(reddit\.com|reddittryhard\.com)?(?:\/r\/){1}([\w]+)/i",
);
if (preg_match($arrRegexPatterns['subreddit'], $text, $arrMatches) !== false)
{
echo json_encode($arrMatches);
}
View select_textarea.html
<textarea rows="10" cols="50" onclick="this.focus();this.select()" readonly="readonly">
example text
</textarea>
@jakebathman
jakebathman / nflPick.php
Last active Sep 30, 2015
NFL Game Picker (random)
View nflPick.php
<?php
$arrMap = array(
"gameId" => "eid",
"gsis" => "gsis",
"day" => "d",
"time" => "t",
"status" => "q",
"homeAbb" => "h",
"homeName" => "hnn",
"homeScore" => "hs",
@jakebathman
jakebathman / Fluent.filter.php
Last active Oct 1, 2015
Flient.filter.php update
View Fluent.filter.php
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/**
* Filter Fluent: Create fluent style for multi-level object access.
*
* PHP version 5
*
* LICENSE: This source file is subject to version 3.0 of the PHP license
* that is available through the world-wide-web at the following URI:
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
@jakebathman
jakebathman / install-tmux
Last active Nov 16, 2015 — forked from rothgar/install-tmux
Install tmux 2.0 on rhel/centos 6
View install-tmux
# Install tmux on Centos release 6.5
# Forked from https://gist.github.com/rothgar/cecfbd74597cc35a6018
# which lists the steps for installing tmux 1.9
# install deps
yum install gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
curl -OL https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
You can’t perform that action at this time.