This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; custom-set-* | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
(custom-set-variables | |
;; custom-set-variables was added by Custom. | |
;; If you edit it by hand, you could mess it up, so be careful. | |
;; Your init file should contain only one such instance. | |
;; If there is more than one, they won't work right. | |
'(ansi-color-faces-vector |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from httplib import HTTPSConnection | |
from urllib import urlencode | |
import json | |
class REST(object): | |
def __init__(self, endpoint=None): | |
self.endpoint = 'httpbin.org' if endpoint is None else endpont |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env racket | |
#lang racket/base | |
(require racket/contract) | |
(require racket/string) | |
(require racket/port) | |
(require racket/cmdline) | |
(require racket/path) | |
(require net/http-client) | |
(require net/uri-codec) | |
(require json) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@plex ~]# cat /etc/systemd/system/[email protected] | |
[Unit] | |
Description=Minecraft Server %i | |
[Service] | |
WorkingDirectory=/opt/minecraft-%i | |
User=mcserver | |
Type=forking | |
ExecStart=/usr/bin/tmux new-session -s mc-%i -d '/bin/java -Xmx2048M -jar minecraft_server.jar nogui' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env racket | |
#lang racket/base | |
(require racket/string) | |
(require racket/port) | |
(require racket/cmdline) | |
(require racket/path) | |
(require net/http-client) | |
(require net/uri-codec) | |
(define (sprunge s) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/macros.py b/macros.py | |
index 821e52e..5dced63 100755 | |
--- a/macros.py | |
+++ b/macros.py | |
@@ -39,6 +39,21 @@ def is_lst(a): | |
return isinstance(a, list) or isinstance(a, tuple) | |
+def precision_and_scale(x): | |
+ """Kudos to http://stackoverflow.com/a/3019027/2720026""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import dbus | |
import argparse | |
import sys | |
def get_session_bus(): | |
global session_bus | |
try: | |
session_bus |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import random | |
import time | |
import curses | |
from line_profiler import LineProfiler | |
try: | |
range = xrange | |
except NameError: | |
pass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
from copy import deepcopy | |
import curses | |
from time import sleep | |
import random | |
import os | |
from collections import namedtuple | |
from line_profiler import LineProfiler | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# ex: set tabstop=4 expandtab ai: | |
from __future__ import print_function | |
from ctypes import cdll, c_char_p | |
import time | |
from datetime import datetime | |
from os import listdir, path | |
from collections import namedtuple | |
import dbus |