Skip to content

Instantly share code, notes, and snippets.

View playpauseandstop's full-sized avatar

Igor Davydenko playpauseandstop

View GitHub Profile
@bradwestfall
bradwestfall / S3-Static-Sites.md
Last active April 10, 2024 16:40
Use S3 and CloudFront to host Static Single Page Apps (SPAs) with HTTPs and www-redirects. Also covers deployments.

S3 Static Sites

⚠ This post is fairly old. I don't keep it up to date. Be sure to see comments where some people have posted updates

What this will cover

  • Host a static website at S3
  • Redirect www.website.com to website.com
  • Website can be an SPA (requiring all requests to return index.html)
  • Free AWS SSL certs
  • Deployment with CDN invalidation
@simonw
simonw / recover_source_code.md
Last active January 16, 2024 08:13
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
@vasilisvg
vasilisvg / HTML-presentation-tools.md
Created January 14, 2012 13:53
HTML presentation tools

#HTML presentation tools

There are many HTML presentation tools and they are all created for slightly different reasons. Here's an overview. Please let me know if I forgot any.

##CSSS

CSS-based SlideShow System

@techniq
techniq / base.html
Created November 13, 2012 14:47
Flask-Admin WTForms boostrap-wysihtml5
<!DOCTYPE html>
<html lang="en">
<head><script type="text/javascript">var NREUMQ=NREUMQ||[];NREUMQ.push(["mark","firstbyte",new Date().getTime()]);</script>
<link href='/static/bootstrap/css/bootstrap.css' rel='stylesheet' type='text/css' />
<link href='/static/wysihtml5/bootstrap-wysihtml5.css' rel='stylesheet' type='text/css' />
</head>
<body>
...
<script src="/static/wysihtml5/wysihtml5-0.3.0.min.js"></script>
@mjackson
mjackson / AutoBindingComponent.js
Created May 6, 2015 20:35
A React.Component subclass that mimics 0.12's auto-binding behavior
var React = require('react');
class AutoBindingComponent extends React.Component {
constructor(props) {
super(props);
for (var property in this) {
if (this.hasOwnProperty(property) && typeof this[property] === 'function') {
this[property] = this[property].bind(this);
}