Skip to content

Instantly share code, notes, and snippets.

View constrict0r's full-sized avatar
👘
The plan is programmed in all of my thousand robots

Victor Mattei constrict0r

👘
The plan is programmed in all of my thousand robots
View GitHub Profile
@constrict0r
constrict0r / slick_gallery_0.html
Last active October 5, 2017 00:42
Basic template (version 0) for creating slick image gallery.
@constrict0r
constrict0r / slick_gallery_1.html
Last active October 5, 2017 00:50
Basic template with javascript (version 1) for creating slick image gallery.
@constrict0r
constrict0r / slick_gallery_2.html
Created October 5, 2017 00:49
Basic template with javascript (version 2) for creating slick image gallery.
@constrict0r
constrict0r / slick_gallery_3.html
Created October 5, 2017 01:03
Basic template with javascript (version 2) for creating slick image gallery.
@constrict0r
constrict0r / slick_gallery_4.html
Created October 5, 2017 01:12
Basic template with javascript and smartresize (version 3) for creating slick image gallery.
@constrict0r
constrict0r / miTest.bats
Last active November 2, 2018 05:02
Bats sample test file.
#!./test/libs/bats/bin/bats
load 'libs/bats-support/load'
load 'libs/bats-assert/load'
setup() {
VAR1=0
}
@test "test setup function pass" {
@constrict0r
constrict0r / bash-export-function-call.sh
Last active November 2, 2018 01:20
Create a function, export it and call it as another user.
#!/bin/bash
USER=$1
say_hello() {
printf 'hello'
}
export -f say_hello
su $USER -c say_hello
@constrict0r
constrict0r / init.el
Last active November 13, 2018 17:59
My emacs configuration.
;; Set keybinding for agenda, capture and store link.
(global-set-key "\C-ca" 'org-agenda)
(setq org-default-notes-file (expand-file-name "~/Documentos/org/notas.org"))
(global-set-key "\C-cc" 'org-capture)
(global-set-key "\C-cl" 'org-store-link)
;; Set notes taking to work with GTD.
(custom-set-variables
'(elpy-rpc-python-command "python3")
'(elpy-test-runner (quote elpy-test-pytest-runner))
@constrict0r
constrict0r / .dir-locals.el
Last active November 4, 2018 02:22
Directory variables to enable pdb on emacs.
;; Directory Local Variables
;; Activate 'amanita' virtual enviroment from emacs.
((nil . ((pyvenv-workon . "amanita"))))
;; Must run on shell: cp /usr/bin/pdb3 ~/.virtualenvs/amanita/bin/pdb
;; And change #! /usr/bin/python3 for #! /home/constrict0r/.virtualenvs/amanita/bin/python.
;; First time on emacs must call a shell an install the package to work:
;; M-x RET shell RET python setup.py install RET.
@constrict0r
constrict0r / .bashrc
Created November 2, 2018 23:05
.bashrc bottom
# Jupyter notebook.
export XDG_RUNTIME_DIR=""
# Nikola.
export EDITOR="emacs"
# Direnv.
eval "$(direnv hook bash)"
# Elpy.