Skip to content

Instantly share code, notes, and snippets.

@croosen
croosen / tictactoe.py
Last active February 25, 2016 10:37
Tic Tac Toe in Python
'''
Tic Tac Toe
A very (very) basic game in Python
'''
def tictactoe():
#create an empty raster
def makeRaster(row, col):
'''
Tailz
'''
class Empty:
def __init__(self):
self.isEmpty = True
class Node:
def __init__(self, value, tail):
/*----------------------------------------------------
* Slider, fancy nudgy hover effect
/*----------------------------------------------------*/
function nudgeSlider(){
const $slickNext = $('.slick-next');
const $slickPrev = $('.slick-prev');
const $slickTrack = $('.slick-track');
$slickNext.add($slickPrev).each(function(){
const $this = $(this);
@croosen
croosen / index.css
Created May 22, 2017 17:56
Testing Repl.it created by croosen - https://repl.it/IL37/0
Empty file
@croosen
croosen / index.css
Created May 22, 2017 17:57
Testing Repl.it created by croosen - https://repl.it/IL37/1
Empty file
@croosen
croosen / paginate.php
Created September 26, 2017 08:04
PHP pagination
// A PHP pagination, based on this tutorial: https://code.tutsplus.com/tutorials/how-to-paginate-data-with-php--net-2928
// Adjusted for own use, fixed some bugs (prev/next links did not stop counting after first or last page was reached)
function pagination($page, $total, $limit, $url)
{
$links = 1; // links to show next to the current link, e.g. 1 = 3 links max.
$list_class = "paginate"; // classname for the pagination list
$limit = $limit ? $limit : 10; // posts per page
$page = $page ? $page : 1; // currentpage
@croosen
croosen / aws-api-clone-apigateway.sh
Last active May 6, 2019 10:19
Clone the example from the multi-user ToDo application from chapter 10 in Amazon Web Services in Action.
$ git clone [email protected]:AWSinAction/apigateway.git
$ cd apigateway/
@croosen
croosen / create-lambda-zip.sh
Last active May 6, 2019 10:19
Create lambda.zip
$ npm install - production
$ ./bundle.sh
@croosen
croosen / create-bucket-upload-lambda.sh
Last active May 6, 2019 10:18
Create a bucket and copy the lambda.zip
$ aws s3api create-bucket - bucket $your-bucket-name - region us-east-1
$ aws s3 cp lambda.zip s3://$your-bucket-name/lambda.zip