Skip to content

Instantly share code, notes, and snippets.

@jaxbot
jaxbot / test.js
Created September 29, 2018 03:39
const puppeteer = require('puppeteer');
var sizes = [
{
name: "1080p",
width: 1920,
height: 1080,
isMobile: false
},
{
@jaxbot
jaxbot / MyArrayList.java
Last active January 8, 2017 15:58 — forked from wwsun/MyArrayList.java
A basic ArrayList implementation(Java)
public class MyArrayList {
private static final int DEFAULT_CAPACITY = 10;
private int theSize;
private int[] theItems;
public MyArrayList() {
clear();
var SURVEY = [
{
question: "Write a few sentences about yourself.",
type: "paragraph",
table: "user",
key: "biography",
example: "Computer Science Major at UCF, clean, quiet, and love spending time with my cat.",
},
{
question: "Where are you looking for roommates?",
from slackbot.bot import Bot
from slackbot.bot import respond_to
from slackbot.bot import listen_to
import random
import re
import sys
def main():
bot = Bot()
bot.run()
Mon 09:54 am,,10000
Mon 09:54 am,Garage Libra,86.891757696127
Mon 10:00 am,Garage Libra,86.891757696127
Mon 10:15 am,Garage Libra,88.480635551142
Mon 10:30 am,Garage Libra,93.64448857994
Mon 10:45 am,Garage Libra,97.616683217478
Mon 11:00 am,Garage Libra,95.729890764647
Mon 11:15 am,Garage Libra,96.524329692155
Mon 11:30 am,Garage Libra,94.93545183714
Mon 11:45 am,Garage Libra,91.658391261172

Python, pip, virtualenv on Windows

  1. Download Python -- please use this version!

THIS IS IMPORTANT Choose "Python 3.4.4 - Download Windows x86-64 MSI installer", specifically that one.

  1. Install it with default options
  2. After installing, open Control Panel -> System -> Advanced System Settings
  3. Click Environment Variables
  4. In the list on the bottom, choose Path and click Edit
private String getHTTPString(String url, CookieStore jar) {
try {
DefaultHttpClient httpclient = new DefaultHttpClient();
HttpGet httpget = new HttpGet(url);
httpget.setHeader("User-Agent", UA);
httpclient.setCookieStore(jar);
HttpResponse response = httpclient.execute(httpget);
InputStream inputStream = response.getEntity().getContent();
@jaxbot
jaxbot / form.html
Last active October 4, 2015 17:59 — forked from divneet/index.js
<!doctype html>
<html>
<head>
<script src='https://www.google.com/recaptcha/api.js'></script>
<script>
function registerAPI(form) {
var params = {
username: form.username.value,
password: form.password.value,
email: form.email.value,
if (!window.Bastide) window.Bastide = {};
window.Bastide.Registration = {
signup: function() {
var nameInput = document.querySelector('#signUpModal .name'),
emailInput = document.querySelector('#signUpModal .email'),
schoolInput = document.querySelector('#signUpModal .school');
var params = {
name: nameInput.value,
email: emailInput.value,