Skip to content

Instantly share code, notes, and snippets.

Avatar

Igor Davydenko playpauseandstop

View GitHub Profile
@bradwestfall
bradwestfall / S3-Static-Sites.md
Last active Sep 22, 2021
Use S3 and CloudFront to host Static Single Page Apps (SPAs) with HTTPs and www-redirects. Also covers deployments.
View S3-Static-Sites.md

S3 Static Sites

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

Resources

@simonw
simonw / recover_source_code.md
Last active Aug 28, 2021
How to recover lost Python source code if it's still resident in-memory
View recover_source_code.md

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
@mjackson
mjackson / AutoBindingComponent.js
Created May 6, 2015
A React.Component subclass that mimics 0.12's auto-binding behavior
View AutoBindingComponent.js
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);
}
@techniq
techniq / base.html
Created Nov 13, 2012
Flask-Admin WTForms boostrap-wysihtml5
View base.html
<!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>
View HTML-presentation-tools.md

#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