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
# see https://github.com/nix-community/nixbox/blob/master/scripts/configuration.nix | |
{ config, pkgs, ... }: | |
{ | |
imports = | |
[ # Include the results of the hardware scan. | |
./hardware-configuration.nix | |
./vagrant.nix | |
]; |
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
(setq copy-output-marker " # <EOF__>") | |
(defun execute-with-marker () | |
(interactive) | |
(kill-ring-save | |
(line-beginning-position) | |
(line-end-position)) | |
(end-of-line) | |
(setq my-comint-originator-buffer (buffer-name)) | |
(other-window 1) |
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
;; messy but potentially useful | |
;; UTIL | |
(defn wrap-quote [s] | |
(str "\"" s "\"")) | |
(defn wrap-single-quote [s] | |
(str "'" 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
import winrm | |
from winrm.protocol import Protocol | |
HOSTNAME='ec2-aaa-bbb-ccc-ddd.compute-1.amazonaws.com' | |
ENDPOINT='http://%s:5985/wsman' % HOSTNAME | |
USERNAME='Administrator' | |
PASSWORD='blahblah' | |
p = Protocol( | |
endpoint=ENDPOINT, |
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
#! /bin/bash | |
# | |
# This script creates a working nix in $HOME | |
# ref https://github.com/pjotrp/nix-no-root | |
if [ $# -ne 1 ]; then | |
echo NEED NIX ROOT | |
exit 1 | |
fi |
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
(defun my-temp-func () | |
(interactive) | |
(insert "tempura true")) | |
(define-minor-mode my-temp-mode | |
"throwaway minor mode for test" | |
:lighter " TEMP!" | |
:keymap (let ((map (make-sparse-keymap))) | |
(define-key map [(control return)] 'my-temp-func) | |
(define-key map (kbd "C-c f") 'my-temp-func) |
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 unicode_literals | |
import os, sys, django | |
from theproject import settings | |
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'theproject.settings') | |
django.setup() | |
# now import normally, e.g. | |
from django.core.management.base import BaseCommand |
NewerOlder