Skip to content

Instantly share code, notes, and snippets.

View efraintorlo's full-sized avatar
🤯
Learning in real world, I'll back later !

ETL efraintorlo

🤯
Learning in real world, I'll back later !
View GitHub Profile
@efraintorlo
efraintorlo / 0_reuse_code.js
Last active November 20, 2015 06:47
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@efraintorlo
efraintorlo / Makefile
Created January 12, 2016 19:29
Mdpress Makefile
SHELL := /bin/bash
# Makefile for Reheating presentation in MDpress
#-----------------------------
# This is the file-name.md to
# be processed by mdpress
#-----------------------------
MDFILE = reheating_press
#-----------------------------
@efraintorlo
efraintorlo / getRunTime.py
Last active January 26, 2016 06:01
Get total Run Time
def getRunTime(theFunction, **kwargs):
timeStart = time.time()
theFunction(**kwargs)
timeFinish = time.time()
print 'Time elapsed:{}'.format(timeFinish - timeStart)
@efraintorlo
efraintorlo / buttondown.css
Created January 28, 2016 06:39 — forked from ryangray/buttondown.css
A clean, minimal CSS stylesheet for Markdown, Pandoc and MultiMarkdown HTML output.
/*
Buttondown
A Markdown/MultiMarkdown/Pandoc HTML output CSS stylesheet
Author: Ryan Gray
Date: 15 Feb 2011
Revised: 21 Feb 2012
General style is clean, with minimal re-definition of the defaults or
overrides of user font settings. The body text and header styles are
left alone except title, author and date classes are centered. A Pandoc TOC
@efraintorlo
efraintorlo / Makefile
Last active February 27, 2016 20:34
Latex file rendering using Latexmk, pandoc and rst2html.py
SHELL := /bin/bash
# ====================
# Author: elchinot7
# Mail: elchinot7@mail.com
# Date: Today
# ====================
# Makefile for LaTeX file:
# ====================
FILE ?= my_Latex_doc
# ====================
@efraintorlo
efraintorlo / get_last_word.py
Created March 2, 2016 01:05
Get last word in string
s = "some string with words"
put_value_in_list = s.split()
last_word = put_value_in_list[-1]
print last_word
@efraintorlo
efraintorlo / progressbar.py
Last active April 11, 2016 03:24
Progress Bar. Print a simple progress bar in Terminal. The bar length is dynamically resized if the terminal window size is changed. Includes a simple example in main() function.
def progressbar(advance, total, mark='=', bar_length=None):
"""
Print Progress Bar in terminal:
ARGS:
advance (int): Typically is a ``loop for index``.
total (int): The total number of steps in the ``loop for``
mark (str): Is the mark used inside the progress bar.
Default is '='
bar_lenght (float): Is the window-ratio to be filled by the
@efraintorlo
efraintorlo / Makefile_Function.makefile
Last active June 1, 2016 00:37
Define and call function with aarguments
warning_plot:
ifeq ($(RUN_NAME), last_run)
$(call example_line,"plot")
@exit 1
endif
warning_replot:
ifeq ($(RUN_NAME), last_run)
$(call example_line,"replot")
@exit 1
@efraintorlo
efraintorlo / Ultisnips_python_file_header.snippets
Last active June 9, 2016 15:25
Python Doc header for Ultisnips
snippet docs "Python Document Info" b!
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
File: ${1:`!v vim_snippets#Filename('$1.py', 'foo.py')`}
Author: ${2:`!v g:snips_author`}
Email: ${3:`!v g:snips_email`}
Github: ${4:`!v g:snips_github`}
Description: ${5:INFO}
@efraintorlo
efraintorlo / make.snippets
Last active June 13, 2016 15:43
Makefile Ultisnips
snippet docs "Makefile Info" b!
SHELL := /bin/bash
#-----------------------------------------------
# __ __ _ __ _ _
# | \/ | __ _| | _____ / _(_) | ___
# | |\/| |/ _ | |/ / _ \ |_| | |/ _ \
# | | | | (_| | < __/ _| | | __/
# |_| |_|\__,_|_|\_\___|_| |_|_|\___|
#
#-----------------------------------------------