Skip to content

Instantly share code, notes, and snippets.

View rsvp's full-sized avatar
🎧
say hi ! https://gitter.im/rsvp/pub

Adriano rsvp

🎧
say hi ! https://gitter.im/rsvp/pub
View GitHub Profile
@rsvp
rsvp / git-logur
Created January 12, 2018 19:54
git-logur : get log of GitHub repository without cloning. Shell script in bash for git log using GitHub API.
#!/usr/bin/env bash
# bash 4.3.11(1) Linux 3.13.0 git 1.9.1 Date : 2018-01-12
#
# _______________| git-logur : get log of GitHub repo without cloning.
#
# Usage: $ git-logur [username] [repository] [-m|-c|-v]
# # Format defaults to messages -m, else
# # -c for concise text, or -v for verbose json.
# # Concise includes author and committer, with timestamps.
#
@rsvp
rsvp / git-lu
Last active August 14, 2017 21:51
git-lu :: Git script gets LAST COMMIT DATE / TIMES (since modification time is unreliable), given path/filename(s) -- supports wildcards, SHA hash ref.
#!/usr/bin/env bash
# bash 4.3.11(1) Linux 3.13.0 git 1.9.1 Date : 2017-08-14
#
# _______________| git-lu : get last commit date for file(s)
# since git can change OS file modification times!
#
# Usage: git lu [filename(s), wildcards optional]
#
# Example: $ git lu *.ipynb # SAMPLE OUTPUT FORMATTING
# 0000-00-00 _Not_committed _No_SHA 00-tpl-v4.ipynb
@rsvp
rsvp / ipython_config.py
Last active February 2, 2017 15:02
IPython v5 config file with custom PROMPTS [deprecating PromptManager], simulating readline vi-mode
#!/usr/bin/env python
# vim: set fileencoding=utf-8 ff=unix tw=78 ai syn=python : per PEP 0263
# python 2.7.13 under Linux Ubuntu 14.04 Date : 2017-02-02
# IPython 5.1.0 from Anaconda distribution
#
# _______________| ipython_config.py : custom config file
#
'''
CHANGE LOG Latest config version, see https://git.io/ipython_config.py
@rsvp
rsvp / bug_free_buddha_comment.py
Created June 20, 2016 19:21
Special comment to minimize bugs in any Python or shell code -- Buddhist ASCII Art
# To minimize bugs, include this comment:
#
#
# _oo0oo_
# o8888888o
# 88" . "88
# (| -_- |)
# 0\ = /0
# ___/`---'\___
# .' \| |// '.
@BlackArbsCEO
BlackArbsCEO / Free_Intraday_StockData_Test_BarChart_API_Gist.py
Created September 22, 2015 19:48
Example code from 'Get Free Intraday Stock Data With Python and BarChart OnDemand API' blog post.
# -*- coding: utf-8 -*-
import time
t0 = time.clock()
import pandas as pd
from pandas.tseries.offsets import BDay
import numpy as np
import datetime as dt
from copy import copy
@iMilnb
iMilnb / boto3_hands_on.md
Last active October 19, 2022 09:15
Programmatically manipulate AWS resources with boto3 - a quick hands on

boto3 quick hands-on

This documentation aims at being a quick-straight-to-the-point-hands-on AWS resources manipulation with [boto3][0].

First of all, you'll need to install [boto3][0]. Installing it along with [awscli][1] is probably a good idea as

  • [awscli][1] is boto-based
  • [awscli][1] usage is really close to boto's
@datagrok
datagrok / README.md
Last active June 6, 2021 14:23
Circular imports in Python 2 and Python 3: when are they fatal? When do they work?
@sudarkoff
sudarkoff / Makefile.pandoc
Last active June 12, 2020 15:13
Makefile for converting Markdown to various formats with Pandoc, TeX and kindlegen
BUILD_DIR := gen
# pandoc is a handy tool for converting between numerous text formats:
# http://johnmacfarlane.net/pandoc/installing.html
PANDOC := pandoc
# pandoc options
# Liberation fonts: http://en.wikipedia.org/wiki/Liberation_fonts
PANDOC_PDF_OPTS := --toc --chapters --base-header-level=1 --number-sections --template=virsto_doc.tex --variable mainfont="Liberation Serif" --variable sansfont="Liberation Sans" --variable monofont="Liberation Mono" --variable fontsize=12pt --variable documentclass=book
PANDOC_EBOOK_OPTS := --toc --epub-stylesheet=epub.css --epub-cover-image=cover.jpg --base-header-level=1
@josephwecker
josephwecker / new_bashrc.sh
Created August 11, 2012 04:36
Replace .bashrc, .bash_profile, .profile, etc. with something much more clean, consistent, and meaningful. Now a repo: https://github.com/josephwecker/bashrc_dispatch
#!/bin/bash
# License: Public Domain.
# Author: Joseph Wecker, 2012
#
# -- DEPRICATED --
# This gist is slow and is missing .bashrc_once
# Use the one in the repo instead! https://github.com/josephwecker/bashrc_dispatch
# (Thanks gioele)
#
# Are you tired of trying to remember what .bashrc does vs .bash_profile vs .profile?
@duncanbeevers
duncanbeevers / sc-dl-min.js
Created March 22, 2012 12:16 — forked from pheuter/sc-dl.js
Bookmarklet that generates download link for a Soundcloud upload
(function(window){var i,$sound,$buttonGroup;var $sounds=$(".sound");var clientId=require("config").get("client_id");var oauthToken=require("lib/connect").getAuthToken();var conversionHelper=require("lib/helpers/conversion-helper");var $downloadButton,size;var params,downloadUrl,onSuccess;for(i=$sounds.length-1;i>=0;i--){$sound=$($sounds[i]);var soundcloudUrl="https://soundcloud.com"+($sound.find(".soundTitle__title").attr("href")||window.location.pathname);params={url:soundcloudUrl,client_id:clientId};onSuccess=function($sound){return function(data){var params={client_id:clientId};downloadUrl=require("lib/url").stringify({query:params},data.stream_url+".mp3");$buttonGroup=$($sound.find(".sound__soundActions .sc-button-group")[0]);size=$buttonGroup.find(".sc-button:first")[0].className.match(/sc-button-((?:small)|(?:medium))/)[1];$downloadButton=$('<a class="sc-button sc-button-download sc-button-icon sc-button-responsive">Download</a>').attr({title:"Download this sound ("+conversionHelper.bytesToMB(data.origi