- a/o 2016-05-21 *
--
- Restart with Cmd-R or Cmd-D
- Erase drive / 3x if second-hand
- Reinstall MacOS
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # | |
| # Description: Sync Plex playlists to shared users. | |
| # Author: /u/SwiftPanda16 | |
| # Requires: plexapi, requests, xmltodict | |
| import requests | |
| import xmltodict |
| # This script adds a "Webclip" shortcut to your homescreen. | |
| # The shortcut can be used to open a web page in full-screen mode, | |
| # or to launch a custom URL (e.g. a third-party app). | |
| # You'll be asked for a title, a URL, and an icon (from your camera roll) | |
| import plistlib | |
| import BaseHTTPServer | |
| import webbrowser | |
| import uuid | |
| from io import BytesIO |
| """ | |
| This module provides a simple WSGI profiler middleware for finding | |
| bottlenecks in web application. It uses the profile or cProfile | |
| module to do the profiling and writes the stats to the stream provided | |
| To use, run `flask_profiler.py` instead of `app.py` | |
| see: http://werkzeug.pocoo.org/docs/0.9/contrib/profiler/ | |
| and: http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-xvi-debugging-testing-and-profiling | |
| """ |
#Mac OS X
| from django.core.exceptions import MiddlewareNotUsed | |
| from django.conf import settings | |
| from django.db import connection | |
| from pymongo.connection import Connection | |
| from time import time | |
| import struct | |
| import bson | |
| from bson.errors import InvalidBSON | |
| class SqldumpMiddleware(object): |
| ################################################################## | |
| # /etc/elasticsearch/elasticsearch.yml | |
| # | |
| # Base configuration for a write heavy cluster | |
| # | |
| # Cluster / Node Basics | |
| cluster.name: logng | |
| # Node can have abritrary attributes we can use for routing |
| #!/bin/bash | |
| # | |
| # When you are working on your macbook sitting in cafe and you have to go pee, | |
| # you need some way to guard you machine. | |
| # | |
| # Start this script, remove any earphones, and go do the job. | |
| # The assumption is the thief will close the lid of the laptop before taking it away. | |
| # This script detects the closing of the lid and plays some loud audio that will | |
| # likely distract the thief and/or grab attention of nearby people, making the |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| #/usr/bin/env bash | |
| # MIT © Sindre Sorhus - sindresorhus.com | |
| # git hook to run a command after `git pull` if a specified file was changed | |
| # Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`. | |
| changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | |
| check_run() { | |
| echo "$changed_files" | grep --quiet "$1" && eval "$2" |