;; Xft.antialias: true
;; Xft.rgba: rgb
-;; (set-default-font "Inconsolata 15")
+(set-default-font "Inconsolata 14")
;; (package-initialize)
-(set-default-font "Bitstream vera sans mono-12")
+;; (set-default-font "Bitstream vera sans mono 12")
;; (set-default-font "Liberation Mono-13")
;; (set-default-font "DejaVu sans mono 15")
;; (set-default-font "Droid sans mono 13")
(ff/compile-when-needed (concat name ".el"))
(mapc (lambda (dir)
(let* ((src (concat dir "/" name)))
+ ;; (message "Compiling " scr) ;;***********
(when (file-newer-than-file-p src (concat src "c"))
(if (let ((byte-compile-verbose nil))
(condition-case nil
epa-file-cache-passphrase-for-symmetric-encryption t
;; And I like ascii files
epa-armor t
+ ;; This goes with in your ~/.gnupg/gpg-agent.conf:
+ ;; allow-emacs-pinentry
+ ;; allow-loopback-pinentry
+ epa-pinentry-mode 'loopback
;; tramp-default-method "ssh"
tramp-default-method "scp"
;; Dealing with the laptop battery
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defcustom ff/battery-dirs '("/sys/class/power_supply/BAT0"
- "/sys/class/power_supply/BAT1")
+(defcustom ff/battery-dirs '("/sys/class/power_supply/BAT0")
"*Where to gather the battery information")
(defcustom ff/temperature-files '("/sys/class/thermal/thermal_zone0/temp"
- "/sys/class/thermal/thermal_zone1/temp")
+ "/sys/class/thermal/thermal_zone1/temp"
+ "/sys/class/thermal/thermal_zone2/temp"
+ "/sys/class/thermal/thermal_zone3/temp"
+ "/sys/class/thermal/thermal_zone4/temp"
+ "/sys/class/thermal/thermal_zone5/temp")
"*Where to gather the thermal information")
(defun ff/file-first-line (file)
(load "vc-git")
-(defun ff/git-pull-push () (interactive)
+(defun ff/git-pull-push (universal) (interactive "P")
+ (when universal (shell-command "git commit -a -m \"Update.\"" nil))
(message "git pull / push ...")
- (async-shell-command "git pull && git push" nil)
+ (async-shell-command "git remote get-url origin && git pull && git push" nil)
)
(defun ff/git-pull () (interactive)
;; An encrypted file to put secure stuff (passwords, ...)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(when (ff/load-or-alert "mailcrypt")
- (mc-setversion "gpg")
- ;; Keep the passphrase for 10min
- (setq mc-passwd-timeout 600
- ff/secure-note-file "~/private/secure-notes.gpg")
- )
+(setq ff/secure-note-file "~/private/secure-notes.gpg")
+
+;; (when (ff/load-or-alert "mailcrypt")
+ ;; (mc-setversion "gpg")
+ ;; ;; Keep the passphrase for 10min
+ ;; (setq mc-passwd-timeout 600
+ ;; ff/secure-note-file "~/private/secure-notes.gpg")
+ ;; )
(defface ff/secure-date
'((t (:background "white" :weight bold)))
"Adds all the stuff to start a new python file"
(interactive)
(goto-char (point-min))
- (insert "#!/usr/bin/env python-for-pytorch
+ (insert "#!/usr/bin/env python
import math
import torch, torchvision
-from torch import Tensor
-from torch import Tensor as T
-
from torch import nn
from torch.nn import functional as F
-from torch.nn.parameter import Parameter
-from torch.nn import Module
")
(python-mode)