Skip to content

Instantly share code, notes, and snippets.

@jakebathman
jakebathman / groupMeApi.php
Last active August 28, 2015 17:50
GroupMe API post
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 August 29, 2015 14:19
Auto-clicker for /r/TheButton

###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 August 29, 2015 14:20
Google Maps v3 basic example
<!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 August 29, 2015 14:26 — forked from bmcculley/markov.php
PHP Markov Chain class
<?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:
------------------
@jakebathman
jakebathman / regex.php
Created August 31, 2015 17:53
TryBot regex
<?php
$arrRegexPatterns = array(
'subreddit' => "/(reddit\.com|reddittryhard\.com)?(?:\/r\/){1}([\w]+)/i",
);
if (preg_match($arrRegexPatterns['subreddit'], $text, $arrMatches) !== false)
{
echo json_encode($arrMatches);
}
<textarea rows="10" cols="50" onclick="this.focus();this.select()" readonly="readonly">
example text
</textarea>
@jakebathman
jakebathman / nflPick.php
Last active September 30, 2015 12:56
NFL Game Picker (random)
<?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 October 1, 2015 15:22
Flient.filter.php update
<?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 November 16, 2015 19:25 — forked from rothgar/install-tmux
Install tmux 2.0 on rhel/centos 6
# 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

Keybase proof

I hereby claim:

  • I am jakebathman on github.
  • I am jakebathman (https://keybase.io/jakebathman) on keybase.
  • I have a public key whose fingerprint is 3891 05D9 9B00 89CA 6185 734B 6AB7 BF82 DEE3 ADC0

To claim this, I am signing this object: