Skip to content

Instantly share code, notes, and snippets.

View rnagasam's full-sized avatar

Ramana Nagasamudram rnagasam

  • Stevens Institute of Technology
  • Hoboken, NJ
View GitHub Profile
@rnagasam
rnagasam / gnus.el
Created November 6, 2018 02:31
Gnus configuration Office365
(setq user-mail-address "user@domain.com"
user-full-name "JohnDoe")
(setq gnus-select-method
'(nnimap "outlook"
(nnimap-address "outlook.office365.com")
(nnimap-server-port "imaps")
(nnimap-stream ssl)))
(setq gnus-secondary-select-methods
@rnagasam
rnagasam / .emacs
Created November 6, 2018 02:29
New init
;; (require 'org)
;; (org-babel-load-file
;; (expand-file-name "cfg.org"
;; user-emacs-directory))
;; --------------------------------------------------------------------
(setq user-full-name "Ramana Nagasamudram"
user-mail-address "rnagasam@stevens.edu")
@rnagasam
rnagasam / streams.scm
Created July 28, 2018 17:09
Streams from SICP
; SICP 3.5 Streams
; constraints :-
; (stream-car (cons-stream x y)) = x
; (stream-cdr (cons-stream x y)) = y
(define the-empty-stream '())
(define stream-null? null?)
@rnagasam
rnagasam / freecad-find-angle.py
Created June 22, 2018 19:32
Find angle between faces
## Finding the angle between two faces of a part.
s1 = doc.Geometry.Shape.Faces[0]
s2 = doc.Geometry.Shape.Faces[1]
vns1 = s1.normalAt(0,0)
vns2 = s2.normalAt(0,0)
alpha = math.degrees(vns1.getAngle(vns2))
@rnagasam
rnagasam / user.cfg
Created June 18, 2018 23:32
FreeCAD config
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<FCParameters>
<FCParamGroup Name="Root">
<FCParamGroup Name="BaseApp">
<FCParamGroup Name="LogLevels">
<FCInt Name="Default" Value="2"/>
</FCParamGroup>
<FCParamGroup Name="Preferences">
<FCParamGroup Name="General">
# i3status configuration file.
# see "man i3status" for documentation.
# It is important that this file is edited as UTF-8.
# The following line should contain a sharp s:
# ß
# If the above line is not correctly displayed, fix your editor first!
general {
colors = true
@rnagasam
rnagasam / .emacs
Created June 18, 2018 20:36
Emacs config
;;;; Emacs configuration file
;;;; Compile configuration file
(defun autocompile nil
"compile itself if ~/.emacs"
(interactive)
(require 'bytecomp)
(let ((dotemacs (file-truename user-init-file)))
(if (string= (buffer-file-name) (file-chase-links dotemacs))
(byte-compile-file dotemacs))))
@rnagasam
rnagasam / .vimrc
Created June 18, 2018 20:35
vimrc
set nocompatible
inoremap jk <esc>
set scrolloff=999
set wildmenu
set path+=**
set number
set expandtab
set autoindent
filetype plugin indent on
syntax enable
@rnagasam
rnagasam / i3.config
Created June 18, 2018 16:46
current i3 config
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
@rnagasam
rnagasam / forbidden.py
Created June 16, 2018 02:46
Forbidden Fruit is one crafty library
from forbiddenfruit import curse, reverse
# add method to int type
def words_of_wisdom(self):
return self * "blah "
curse(int, "words_of_wisdom", words_of_wisdom)
# add classmethod
def hello(self):