Skip to content

Instantly share code, notes, and snippets.

View arleslie's full-sized avatar

Andrew Leslie arleslie

View GitHub Profile
@arleslie
arleslie / Reproduction 1
Created March 15, 2016 04:16
SublimeLinter-PHP issues.
SublimeLinter: error in SublimeLinter daemon:
SublimeLinter: --------------------
SublimeLinter: Traceback (most recent call last):
File "C:\Users\Andrew Leslie\AppData\Roaming\Sublime Text 3\Packages\SublimeLinter\lint\queue.py", line 57, in loop
item = self.q.get(block=True, timeout=self.MIN_DELAY)
File "./queue.py", line 175, in get
queue.Empty
During handling of the above exception, another exception occurred:
@arleslie
arleslie / javascript.js
Created January 27, 2016 16:28
Dailybreak auto bot
function scrollForPoints() {
var current = $('span.points').text();
function scroll() {
var bottemReached = $(window).scrollTop() + $(window).height() == $(document).height();
if (current === $('span.points').text()) {
if (bottemReached) {
window.scrollTo(0,0);
alert('poll');
} else {
@arleslie
arleslie / scraper.js
Last active January 14, 2016 17:21
Enom API Docs to PHP Functions
// This is a quick and dirty scraper for Enom's API docs to generate php functions for arleslie/enom-php
// And by dirty, I mean like a cheap hooker that hasn't bathed for days.
var request = require('request'),
cheerio = require('cheerio');
var baseurl = 'http://www.enom.com/APICommandCatalog/API%20topics/';
request(baseurl + 'api_Command_Categories.htm', function(err, resp, body) {
var $ = cheerio.load(body);
@arleslie
arleslie / imgur.php
Created December 16, 2015 00:37
[PHP] Grab random images from imgur
<?php
$includeNSFW = !empty($_GET['NSFW']);
if (empty($_GET['images'])) {
$_GET['images'] = 50;
}
$totalImages = intval($_GET['images']);
$processedImages = 0;
@arleslie
arleslie / keybase.md
Last active January 20, 2016 04:56
keybase.md

Keybase proof

I hereby claim:

  • I am arleslie on github.
  • I am arleslie (https://keybase.io/arleslie) on keybase.
  • I have a public key whose fingerprint is 7DC9 4AD6 333F 0424 F154 8AB9 EF19 AC5B CD8E 3D16

To claim this, I am signing this object: