Skip to content

Instantly share code, notes, and snippets.

View awesmubarak's full-sized avatar

Awes Mubarak awesmubarak

View GitHub Profile
@sanchitgangwar
sanchitgangwar / snake.py
Created March 22, 2012 12:38
Snakes Game using Python
# SNAKES GAME
# Use ARROW KEYS to play, SPACE BAR for pausing/resuming and Esc Key for exiting
import curses
from curses import KEY_RIGHT, KEY_LEFT, KEY_UP, KEY_DOWN
from random import randint
curses.initscr()
win = curses.newwin(20, 60, 0, 0)
@XVilka
XVilka / TrueColour.md
Last active July 9, 2024 23:28
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

@fourohfour
fourohfour / smh-api.md
Created November 6, 2016 13:25
Information about the Show My Homework API

Show My Homework API


File detailing what I've worked out so far from investigating the Show My Homework API.

API Requests

API requests are made in the form of a HTTPS GET request to the SMH API endpoint.

https://api.showmyhomework.co.uk/api/{request}

anonymous
anonymous / gist:9d7468755dd76a35d93beeb5c0a5bdcf
Created March 3, 2017 08:00
Conway life clock AM+PM
#CXRLE Pos=-7557,-1110
x = 10284, y = 6796, rule = B3/S23
6111b2o$6111b2o4$6129bobo$6124bo4bo2bo$6125b2o5b2o8bo$6120b2o8bo3b2o5b
obo$6120b2o10b2o6bob2o$6109b2obob2o13bo2bo6b2ob2o$6129bobo8bob2o$6109b
o5bo25bobo8b2o$6132bo9bo9bobo$6110b2ob2o16bo22bo$6112bo18b3o20b2o6$
6115bo17b2o$6109b3o4b2o15b2o$6108bo3bo2b2o2$6107bo5bo$6107b2o3b2o2$
6132b2o$6132bobo$6134bo$6134b2o$6107b2o$6108bo$6105b3o$6105bo7$6119bo$
6119b3o$6122bo14bobo$6121b2o6b2o7b2o5b2o$6128bobo7bo6bo$6129bo16b3o$
6148bo2$6116b2o$6116b2o6b2o29b2o$6124b2o28bo2bo$6155b2o$6133b2o20b2o$
6133b2o19b2o8b2o$6153b2obo6bobo$6118b2o33b2obo7bo$6117bobo35bo$6117bo
@simonw
simonw / recover_source_code.md
Last active June 21, 2024 00:11
How to recover lost Python source code if it's still resident in-memory

How to recover lost Python source code if it's still resident in-memory

I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6

Attach a shell to the docker container

Install GDB (needed by pyrasite)

apt-get update && apt-get install gdb
@max-mapper
max-mapper / bibtex.png
Last active March 10, 2024 21:53
How to make a scientific looking PDF from markdown (with bibliography)
bibtex.png