Преглед на файлове

Merge remote-tracking branch 'origin/master' into cray

cray
Mitch Tishmack преди 9 години
родител
ревизия
59583a0c90
променени са 5 файла, в които са добавени 49 реда и са изтрити 23 реда
  1. +6
    -1
      Makefile
  2. +14
    -14
      bin.org
  3. +1
    -0
      dotprofile.org
  4. +25
    -4
      emacs.org
  5. +3
    -4
      nix.org

+ 6
- 1
Makefile Целия файл

@@ -8,7 +8,10 @@ LASTGEN:=$(PWD)/generation/$(LAST)
TANGLERS:=$(shell ls -d *.org)
GEN:=$(LAST)
OPTS:=
HOST:=$(shell uname -n)
# OSX uses hostname -s for the "stable" hostname
# uname -n can return dhcp addresses, which aren't
# stable.
HOST=$(shell echo "$$(hostname -s || uname -n)")
USEROPTS:=$(OPTS):$(HOST)
NAME:=default

@@ -31,11 +34,13 @@ next: diff

.PHONY: tangle-next
tangle-next:
@echo Tangling for hostname $(HOST)
$(MAKE) tangle
$(MAKE) generation
$(MAKE) next
$(MAKE) copy GEN=$(NEXT)
@echo $(NEXT) > .last
@echo Tangled for hostname $(HOST)

copy:
cd $(PWD)/generation/$(GEN) && find . -type f -exec rm -f $(DEST)/{} \;


+ 14
- 14
bin.org Целия файл

@@ -17,7 +17,7 @@ A stupid script I wrote ages ago to help me be lazy with cidr
notation for stuff. Setup the wrong netmask a few times and
you too, will wish for something similar.

#+BEGIN_SRC perl :tangle tmp/bin/cidr
#+BEGIN_SRC perl :padline no :tangle tmp/bin/cidr:padline no
#!/usr/bin/env perl
#
# Convert input ip/cidr|netmask|hexnetmask to useable network information.
@@ -174,7 +174,7 @@ $ dns 216.58.216.206
ord31s21-in-f206.1e100.net is 216.58.216.206
ord31s21-in-f206.1e100.net is also ord31s21-in-f206.1e100.net

#+BEGIN_SRC perl :tangle tmp/bin/dns
#+BEGIN_SRC perl :padline no :tangle tmp/bin/dns
#!/usr/bin/env perl
#
# Stupid script to help with dns information. Solaris 9/8 lack the host utility.
@@ -218,7 +218,7 @@ exit 0;
* ~/bin/ts
Stupid simple timestamp script that just takes input, and prefixes a timestamp to to output. Thats it.

#+BEGIN_SRC perl :tangle tmp/bin/ts
#+BEGIN_SRC perl :padline no :tangle tmp/bin/ts
#!/usr/bin/env perl
#
# Timestamp stdin and then print to stdout and flush.
@@ -267,7 +267,7 @@ $ diskhog -n 4 /tmp
420.57k /private/tmp/sysp.xml
161.17k /private/tmp/KSOutOfProcessFetcher.12572.ppfIhqX0vjaTSb8AJYobDV7Cu68=

#+BEGIN_SRC perl :tangle tmp/bin/diskhog
#+BEGIN_SRC perl :padline no :tangle tmp/bin/diskhog
#!/usr/bin/env perl
#
# Find out who is hogging disk space and where.
@@ -435,7 +435,7 @@ bridge100@1500 192.168.64.1/24 a:b:c:d:e:f

Comes in slightly handy, no guarantees it parses ifconfig right tho.

#+BEGIN_SRC perl :tangle tmp/bin/ifinfo
#+BEGIN_SRC perl :padline no :tangle tmp/bin/ifinfo
#!/usr/bin/env perl
#
# Because ifconfig output is... overly verbose.
@@ -651,7 +651,7 @@ if (scalar(@output) < 1){
Mostly because I use iso8601 timestamps and its nice to use them
generally without depending on gnu date.

#+BEGIN_SRC perl :tangle tmp/bin/iso8601
#+BEGIN_SRC perl :padline no :tangle tmp/bin/iso8601
#!/usr/bin/env perl
#-*-mode: Perl; coding: utf-8;-*-
use strict;
@@ -677,7 +677,7 @@ generally without depending on gnu date.

Basically getent passwd $username/$uid to show who is on a system.

#+BEGIN_SRC perl :tangle tmp/bin/whoson
#+BEGIN_SRC perl :padline no :tangle tmp/bin/whoson
#!/usr/bin/env perl
#
# Because i'm lazy and sick of typing in getent passwd $someusername/uid
@@ -715,7 +715,7 @@ foreach my $user (keys %users){

Silly wrapper perl script that makes it easier to get at the gecos string for a $user/$uid.

#+BEGIN_SRC perl :tangle tmp/bin/gecos
#+BEGIN_SRC perl :padline no :tangle tmp/bin/gecos
#!/usr/bin/env perl
#
# Dumb wrapper to get the gecos information from a uid/username.
@@ -737,7 +737,7 @@ foreach my $input (@ARGV){

Stupid perl script to mimic hatimerun for systems that don't have it.

#+BEGIN_SRC perl :tangle tmp/bin/hatimerun
#+BEGIN_SRC perl :padline no :tangle tmp/bin/hatimerun
#!/usr/bin/env perl
#
# hatimerun in perl, sorta
@@ -806,7 +806,7 @@ if ($@){

Silly perl based ptree alike implementation. Mad old code that should be avoided at all costs but it works and I'm not fixing it unless I need to.

#+BEGIN_SRC perl :tangle tmp/bin/ptree.pl
#+BEGIN_SRC perl :padline no :tangle tmp/bin/ptree.pl
#!/usr/bin/env perl
#
# ptree for linux/darwin/solaris. I got sick of ps and pstree on linux.
@@ -984,7 +984,7 @@ exit 0;

Just find out if a port responds to anything tcp related or not.

#+BEGIN_SRC perl :tangle tmp/bin/portchk
#+BEGIN_SRC perl :padline no :tangle tmp/bin/portchk
#!/usr/bin/env perl
#
# Dumb wrapper to get the gecos information from a uid/username.
@@ -1006,7 +1006,7 @@ foreach my $input (@ARGV){

More for nix on macos, but just merges NixOS/nipkgs origin/master to the current branch in a tmux window and watches it.

#+BEGIN_SRC sh :tangle (tangle/file "bin/nix-update" (bound-and-true-p nix-p))
#+BEGIN_SRC sh :padline no :tangle (tangle/file "bin/nix-update" (bound-and-true-p nix-p))
#!/usr/bin/env sh
#-*-mode: Shell-script; coding: utf-8;-*-
# File: tmux-nix.sh
@@ -1053,7 +1053,7 @@ Example:
notify "some command" "not ok"

First param is the message, second title of the notification.
#+BEGIN_SRC sh :tangle (tangle/file "bin/notify" (bound-and-true-p macos-p))
#+BEGIN_SRC sh :padline no :tangle (tangle/file "bin/notify" (bound-and-true-p macos-p))
#!/bin/sh
message=${1:="no message"}
title=''
@@ -1073,7 +1073,7 @@ Stupid ruby script I wrote to highlight the week/day in a calendar. I don't reme

TODO: why the hell is :mkdirp yes needed here but nowhere else?

#+BEGIN_SRC ruby :tangle tmp/bin/today :mkdirp yes
#+BEGIN_SRC ruby :padline no :tangle tmp/bin/today :mkdirp t
#!/usr/bin/env ruby
cal, today, week_color, day_color, reset = %x(cal).split(%r(\n)), Time.now.day, %x(tput sgr0;tput setab 4;tput setaf 7), %x(tput sgr0; tput setab 0;tput setaf 7;tput bold), %x(tput sgr0)
done=false


+ 1
- 0
dotprofile.org Целия файл

@@ -265,6 +265,7 @@ nix_env_setup()
export NIX_PATH=${HOME}/src/github.com/NixOS/nixpkgs:nixpkgs=${HOME}/src/github.com/NixOS/nixpkgs
export NIX_CFLAGS_COMPILE="-idirafter /usr/include"
export NIX_CFLAGS_LINK="-L/usr/lib"
export PKG_CONFIG_PATH="~/.nix-profile/lib/pkgconfig"

NIX_GHC=$(type -p ghc > /dev/null 2>&1)
if [ -n "$NIX_GHC" ]; then


+ 25
- 4
emacs.org Целия файл

@@ -566,6 +566,7 @@ Make git not ass to use. At least in emacs. magit is the best git interface... i

#+BEGIN_SRC emacs-lisp
(use-package magit
:diminish magit-mode
:ensure t
:commands (magit-init
magit-status
@@ -640,7 +641,25 @@ Org-mode keybindings and settings, pretty sparse really.
'(org-hide-leading-stars t)
'(org-hide-emphasis-markers t)
'(org-confirm-babel-evaluate nil)
'(org-capture-templates
'(("t" "Todo" entry (file+headline "~/src/bitbucket.org/mitchty/org/gtd.org" "Tasks")
"* TODO %?\n %i\n %a")
("n" "Note" entry (file+datetree "~/src/bitbucket.org/mitchty/org/notes.org")
"* %?\nRandom Note entered on %U\n %i\n %a")
("m" "Todo from email" entry (file+headline "~/src/bitbucket.org/mitchty/org/gtd.org" "INBOX")
"* TODO %?, Link: %a")
("u" "Url" entry (file+headline "~/src/bitbucket.org/mitchty/org/urls.org" "Urls")
"* %u\n\n %i" :prepend t)
))
)

;; typing stuff like the mode for a snippet is for chumps
(add-to-list 'org-structure-template-alist '("el" "#+BEGIN_SRC emacs-lisp\n?\n#+END_SRC" ""))
(add-to-list 'org-structure-template-alist '("hs" "#+BEGIN_SRC haskell\n?\n#+END_SRC" ""))
(add-to-list 'org-structure-template-alist '("pl" "#+BEGIN_SRC perl\n?\n#+END_SRC" ""))
(add-to-list 'org-structure-template-alist '("py" "#+BEGIN_SRC python\n?\n#+END_SRC" ""))
(add-to-list 'org-structure-template-alist '("sh" "#+BEGIN_SRC sh\n?\n#+END_SRC" ""))

(org-babel-do-load-languages 'org-babel-load-languages
(append org-babel-load-languages
'(
@@ -648,7 +667,6 @@ Org-mode keybindings and settings, pretty sparse really.
(ditaa . t)
(emacs-lisp . t)
(haskell . t)
(idris . t)
(latex . t)
(perl . t)
(python . t)
@@ -986,15 +1004,17 @@ Need to make haskell source be all pretty.

#+BEGIN_SRC emacs-lisp
(use-package haskell-mode
:diminish haskell-mode
:ensure t
:config
(progn
(use-package intero
(use-package dante
:ensure t
:config
(progn
(add-hook 'haskell-mode-hook 'intero-mode)
(add-hook 'haskell-mode-hook 'dante-mode)
)
:diminish dante-mode
)
(use-package hindent
:if (executable-find "hindent")
@@ -1003,6 +1023,7 @@ Need to make haskell source be all pretty.
(progn
(add-hook 'haskell-mode-hook 'hindent-mode)
)
:diminish hindent-mode
)
(use-package flycheck-haskell :ensure t)
(use-package flycheck-hdevtools
@@ -1150,7 +1171,7 @@ Instead of text might as well get a decent mode hook going here.
#+BEGIN_SRC emacs-lisp
(use-package xcscope
:defer t
:init (progn (cscope-setup))
:config (progn (cscope-setup))
)
#+END_SRC



+ 3
- 4
nix.org Целия файл

@@ -11,7 +11,7 @@

Nix user config.nix setup.

#+BEGIN_SRC conf :mkdirp yes :tangle (tangle/file ".nixpkgs/config.nix" (bound-and-true-p nix-p))
#+BEGIN_SRC conf :padline no :mkdirp yes :tangle (tangle/file ".nixpkgs/config.nix" (bound-and-true-p nix-p))
{
packageOverrides = pkgs: with pkgs;
let in rec {
@@ -52,18 +52,16 @@ Nix user config.nix setup.
gnupg
gnupg1compat
gnutar
gnutls
graphviz-nox
haskellPackages.ShellCheck
haskellPackages.cabal-dependency-licenses
haskellPackages.ghc-mod
haskellPackages.hasktags
haskellPackages.hindent
haskellPackages.hoogle
haskellPackages.hspec
haskellPackages.idris
haskellPackages.intero
haskellPackages.pandoc
haskellPackages.stack
htop
imagemagick
iperf
@@ -102,6 +100,7 @@ Nix user config.nix setup.
sloccount
sqlite
sshpass
stack
texlive.combined.scheme-full
tmux
tree


Зареждане…
Отказ
Запис