Skip to content

Instantly share code, notes, and snippets.

View neo-inuit's full-sized avatar

neo neo-inuit

  • neo-igloo
  • Sophia Antipolis
View GitHub Profile
@neo-inuit
neo-inuit / area.user.js
Last active August 29, 2015 14:15
area grow
// ==UserScript==
// @name Essai
// @namespace test
//// page to execute
// @include *
// ==/UserScript==
(function () {
// Removes all occurences of elements whose XPath is provided from the document.

Magic words:

psql -U postgres

Most \d commands support additional param of __schema__.name__ and accept wildcards like *.*

  • \q: Quit/Exit
  • \c __database__: Connect to a database
  • \d __table__: Show table definition including triggers
#!/bin/bash -xe
#THIS SCRIPT MUST BE RUN AS ROOT
ADMIN_USER=admin
ADMIN_GROUP=admin
#add admin group
(cat /etc/group | grep -E '\b$ADMIN_GROUP\b') || sudo groupadd $ADMIN_GROUP

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000