Skip to content

Instantly share code, notes, and snippets.

View ns23k's full-sized avatar
🐊

Naman Sharma ns23k

🐊
View GitHub Profile
@beaucarnes
beaucarnes / keep_alive.py
Created December 10, 2020 15:42
Python Server for Discord Bot
from flask import Flask
from threading import Thread
app = Flask('')
@app.route('/')
def home():
return "Hello. I am alive!"
def run():
from rply import LexerGenerator
class Lexer():
def __init__(self):
self.lexer = LexerGenerator()
def _add_tokens(self):
# Print
self.lexer.add('PRINT', r'print')
@1wErt3r
1wErt3r / SMBDIS.ASM
Created November 9, 2012 22:27
A Comprehensive Super Mario Bros. Disassembly
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY
;by doppelganger (doppelheathen@gmail.com)
;This file is provided for your own use as-is. It will require the character rom data
;and an iNES file header to get it to work.
;There are so many people I have to thank for this, that taking all the credit for
;myself would be an unforgivable act of arrogance. Without their help this would
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no
@ryanb
ryanb / github_tree_slider.js
Created December 6, 2010 17:23
This is how GitHub's new AJAX file browser works.
GitHub.TreeSlider = function () {
if (window.history && window.history.pushState) {
function a() {
if (e.sliding) {
e.sliding = false;
$(".frame-right").hide();
$(".frame-loading:visible").removeClass("frame-loading")
}
}
if (!($("#slider").length == 0 || !GitHub.shouldSlide)) if (!navigator.userAgent.match(/(iPod|iPhone|iPad)/)) {