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
set-option -g status-bg black | |
set-option -g status-fg white | |
set-option -g status-interval 60 | |
set-option -g status-left "#($HOME/bin/imapbiff.pl)" | |
set-option -g status-right "#(/bin/date +\"%R %F\")" |
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
;; biff | |
(defvar foundnewmbox "") | |
(defun fmbiff () | |
(interactive) | |
(save-excursion | |
(set-buffer "*Group*") | |
(beginning-of-buffer) | |
(defvar foundanymbox nil) | |
(cond ((re-search-forward "INBOX.ALL" nil t) | |
(setq foundanymbox t)) |
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
ssl_session_cache shared:SSL:10m; | |
ssl_session_timeout 5m; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
ssl_ciphers ECDHE-RSA-RC4-SHA:ECDHE-RSA-AES128-SHA:AES256-CGM-SHA256:ECDHE-RSA-AES256-SHA256:RC4:HIGH:!aNULL:!MD5:-LOW:-SSLv2:-EXP; | |
ssl_prefer_server_ciphers on; | |
add_header Strict-Transport-Security "max-age=2592000; includeSubdomains"; |
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
module Main where | |
import System.IO | |
import Data.Char | |
import System.Console.ANSI | |
-- ord val of 10 is return key | |
getPW = getPW' "" where | |
getPW' s = getChar >>= \x -> | |
if ((ord x) == 10) then return s | |
else cursorBackward 1 >> putStr "*" >> getPW' (s ++ [x]) |
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
module Main (main) where | |
import Codec.Crypto.SimpleAES | |
import Data.ByteString.Lazy as L | |
import Data.ByteString.Lazy.Char8 as L8 | |
import Data.ByteString.Char8 as B8 | |
main = do | |
let lstr = L.concat [L8.pack "hi there"] | |
pw = B8.pack "abc123abc1234567" | |
lencode2 <- encryptMsg CBC pw lstr |
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 perl | |
use v5.14; | |
use warnings; | |
use strict; | |
# this is my password file. yours may be different | |
my $pwfile = $ENV{'HOME'} . '/git/docs/pw/pw.txt.asc'; | |
die $pwfile . ' not readable?' unless (-r $pwfile); | |
# search term required |
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 php-delete-trailing-blank-lines () | |
"Deletes all blank lines at the end of the file." | |
(interactive) | |
(save-excursion | |
(save-restriction | |
(widen) | |
(goto-char (point-max)) | |
(delete-blank-lines) | |
(let ((trailnewlines (abs (skip-chars-backward "\n\t")))) | |
(if (> trailnewlines 0) |
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
;; php | |
(load "~/.el/lang/php-mode.el") | |
(defun my-php-mode-hook () | |
(c-set-offset 'substatement-open 0) | |
(c-set-offset 'statement-case-open 0) | |
(c-set-offset 'case-label '+) | |
(setq tab-width 4) | |
(setq c-basic-offset 4) | |
(setq c-auto-newline nil) | |
(setq indent-tabs-mode nil) |
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
(use readline regex) | |
(current-input-port (make-gnu-readline-port)) | |
(gnu-history-install-file-manager (string-append (or (get-environment-variable "HOME") ".") "/.csi.history")) | |
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
module Main where | |
import Char | |
f a1 a2 b1 b2 = | |
(a1 == (((a2 + b2 - b1) / 10.0) + b1 - a2) * (-1.0)) && | |
(a2 == ((a2 - a1 - b1) * 10.0) - b2 + b1) && | |
(b1 == (((a2 - a1 - b1) * 10.0) - a2 - b2) * (-1.0)) && | |
(b2 == ((a2 - a1 - b1) * 10) - a2 + b1) | |
-- first line transforms 1978 -> [1.0,9.0,7.0,8.0] |