Skip to content

Instantly share code, notes, and snippets.

Bharadwaj Raju bharadwaj-raju

Block or report user

Report or block bharadwaj-raju

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
simonw /
Last active Dec 20, 2019
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 and

Attach a shell to the docker container

Install GDB (needed by pyrasite)

apt-get update && apt-get install gdb
Videonauth / list.asc
Last active Aug 10, 2018
List for AutoComment tool on SE Sites.
View list.asc
###[Q] More than one question asked
It is preferred if you can post separate questions instead of combining your questions into one. That way, it helps the people answering your question and also others hunting for at least one of your questions. Thanks!
###[Q] Duplicate Closure
This question will probably be closed as a duplicate soon. If the answers from the duplicates don't fully address your question please edit it to include why and flag this for re-opening. Thanks!
###[A] Answers just to say Thanks!
Please don't add "thanks" as answers. Invest some time in the site and you will gain sufficient [privileges](//$SITEURL$/privileges) to upvote answers you like, which is the $SITENAME$ way of saying thank you.
###[A] Nothing but a URL (and isn't spam)
View sound.c
#include "math.h"
//based on
//used for my alarm clock.
//warning: loud.
int main(t) {
nirenjan / bishop.c
Created Jan 4, 2013
Simulate a drunken bishop walk to produce OpenSSL random art.
View bishop.c
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#define XLIM 17
#define YLIM 9
#define ARSZ (XLIM * YLIM)
#define DEBUG 0
kklimonda /
Created Mar 28, 2011
A minimal Gtk+/Webkit based browser in Python
import sys
from gi.repository import Gtk, Gdk, WebKit
class BrowserTab(Gtk.VBox):
def __init__(self, *args, **kwargs):
super(BrowserTab, self).__init__(*args, **kwargs)
go_button = Gtk.Button("go to...")
go_button.connect("clicked", self._load_url)
self.url_bar = Gtk.Entry()
You can’t perform that action at this time.