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
# binary to hexidecimal | |
def bin_to_hex(num): | |
total = "" | |
subtotal = 0 | |
i = 0 | |
numstr = str(num) | |
while(numstr): | |
# foreach digit of the nibble (4 binary digits) translate into single hex digit | |
# start from least sig digit | |
subtotal = 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
# binary to oct | |
def bin_to_oct(num): | |
total = "" | |
subtotal = 0 | |
numstr = str(num) | |
while(numstr): | |
# foreach digit of the nibble (3 binary digits) translate into single oct digit | |
# start from least sig digit | |
subtotal = 0 | |
# pad front of numbers with 0's to fill to 4 bits |
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
;; magit stuff!! | |
(magit-file-header ((t (:foreground "violet")))) | |
(magit-hunk-header ((t (:foreground "blue")))) | |
(magit-header ((t (:foreground "cyan")))) | |
(magit-tag-label ((t (:background "blue" :foreground "orange")))) | |
(magit-diff-add ((t (:foreground "MediumSlateBlue")))) | |
(magit-diff-del ((t (:foreground "maroon")))) | |
(magit-item-highlight ((t (:background "#000012")))) |
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
<input type="text" x-webkit-speech speech /> |
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
;; Org | |
(org-agenda-clocking ((t ,clock-line))) | |
(org-agenda-column-dateline ((t (:inherit org-column)))) | |
;; (org-agenda-column-dateline ((t (:background "deep sky blue" :height 79 :family "Consolas")))) | |
(org-agenda-current-time ((t (:weight bold :underline t :foreground "purple")))) | |
(org-agenda-date ((t (:height 1.6 :weight bold :foreground "#0063F5")))) ; "#87C9FC" | |
(org-agenda-date-today ((t (:height 1.6 :weight bold :foreground "purple")))) ; "#CCCCFF" ; inherit | |
(org-agenda-date-weekend ((t (:height 1.6 :weight bold :foreground "dim gray")))) ; "#B6B2AE" ; inherit | |
(org-agenda-diary ((t (:weight bold :foreground "green4" :background "light blue")))) | |
(org-agenda-dimmed-todo-face ((t (:foreground "gold2")))) ; org-blocked-todo |
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
ursa' => array( | |
'title' => t('Ursa Major'), | |
'colors' => array( | |
'top' => '#300A24', | |
'bottom' => '#300A24', | |
'bg' => '#fffdf7', | |
'sidebar' => '#edede7', | |
'sidebarborders' => '#e7e7e7', | |
'footer' => '#2c2c28', | |
'titleslogan' => '#ffffff', |
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
;; Keyboard Macro Editor. Press C-c C-c to finish; press C-x k RET to cancel. | |
;; Original keys: C-s ][ RET C-k C-r [[ RET " C-y 2*C-b 4*C-d "; DEL : C-e C-d C-z 2*C-b 2*C-d C-a 2*C-n | |
Command: last-kbd-macro | |
Key: none | |
Macro: | |
C-s ;; isearch-forward | |
][ ;; self-insert-command * 2 |
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
(defcustom drush-default-alias-file "~/.drush/aliases.drushrc.php" | |
"Default drush configuration directory." | |
:type 'string | |
:group 'drupal) | |
(defun drupal-drush-alias-add (name uri root) | |
"Add an alias to the drush aliases file in a buffer." | |
(interactive "sAlias Name: \nsURI: \nsRoot: ") | |
(drupal-drush-process-alias-file drush-default-alias-file name uri root)) |
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 the port of the Chat Server | |
(defvar port 1337) | |
;; set the host of the Chat Server | |
(defvar host "localhost") | |
(defun my-chat () | |
"Chat client for chat server assignment" | |
(interactive) | |
;; open-network-stream creates a socket to the Chat Server |