Skip to content

Instantly share code, notes, and snippets.

;; Build and Run C code from Spacemacs
;; If the code hasn't compilied then we build the code and create an execute file with a buffer's name without an extensions in the current folder
;; Or just run the program in bottom pop-up shell window
;; P.Pavlov 2016
(defun execute-c-program ()
(interactive)
(let ((c-code-compile (concat "gcc " (buffer-name) " -o " (file-name-base)))
(c-code-run (concat "./" (file-name-base))))
(if (not (locate-file (file-name-base) "."))
(shell-command c-code-compile))
def arg_process():
for arg in sys.argv[1:]:
if arg in ["-h", "--help"]:
print("usage:csv2html.py [maxwidth=int] [format=str] < infile.csv > outfile.html")
return None, None
elif arg.startswith(maxwidth_arg):
try:
maxwidth = int(arg[len(maxwidth_arg):])
except ValueError:
pass
@ghost355
ghost355 / httpswwwdropboxcoms0mq5bj3sm4qzc2lOmenTokenobjdl1.obj
Created January 24, 2016 08:14
модель жетона знамений из Древнего Ужаса
This file has been truncated, but you can view the full file.
# Blender v2.70 (sub 0) OBJ File: 'OmenToken.blend'
# www.blender.org
o Circle.004
v -0.263000 -0.000935 0.492039
v -0.238541 -0.000935 0.504352
v -0.263208 -0.000905 0.492427
v -0.286827 -0.000935 0.478542
v -0.262793 -0.000905 0.491651
v -0.238352 -0.000905 0.503954
v -0.238729 -0.000905 0.504750
# Blender v2.70 (sub 0) OBJ File: 'OmenTokenCollision.blend'
# www.blender.org
o Circle.004
v -0.307290 -0.000000 0.164250
v -0.314980 -0.000000 0.148974
v -0.298861 -0.000000 0.179130
v 0.333429 -0.000000 -0.101145
v 0.337991 -0.000000 -0.084662
v 0.328065 -0.000000 -0.117384
v -0.221043 -0.000000 -0.269341
@ghost355
ghost355 / .dir.locals.el
Last active September 30, 2015 21:07
Add this file dir.locals.el in root of your home folder or root of your Haskell projects folder or into each of folder your Haskel projects
((haskell-mode
. ((haskell-indent-spaces . 2)
(hindent-style . "gibiansky")
(haskell-process-type . stack-ghci)
(haskell-process-path-ghci . "stack")
(haskell-process-args-ghci . ("ghci"))
(haskell-process-args-stack-ghci . ("--ghc-options=-ferror-spans" "--with-ghc=ghci-ng"))))
(haskell-cabal-mode
. ((haskell-process-type . stack-ghci)
(haskell-process-path-ghci . "stack")
@ghost355
ghost355 / .spacemacs
Created September 30, 2015 20:49
My .spacemacs config file. Working well with Haskell stack only environment.
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration."
(setq-default
;; List of additional paths where to look for configuration layers.
;; Paths must have a trailing slash (i.e. `~/.mycontribs/')
dotspacemacs-configuration-layer-path '()