Skip to content

Instantly share code, notes, and snippets.

View schcriher's full-sized avatar
🏠
Working from home

Schmidt Cristian Hernán schcriher

🏠
Working from home
View GitHub Profile
var xLBD = {};
xLBD.c = function (){
xLBD.f = unescape(document.querySelector("[flashvars]").getAttribute("flashvars")).substring(7);
xLBD.f = JSON.parse(xLBD.f.substring(0, xLBD.f.lastIndexOf("}") + 1)).video_data[0].hd_src;
xLBD.a = "<div style='position:absolute;top:100px;height:300px;left:15%;background:#fff;border:10px solid #000;font-size:5em;padding:100px;'>Click <a download='lookback.mp4' href='"+xLBD.f+"'>here<\/a> to download your lookBack video.</div>";
document.body.innerHTML += xLBD.a;
}
if(document.readyState == "complete")
xLBD.c();
else window.onload = xLBD.c;
@astrojuanlu
astrojuanlu / bezier_curves.py
Last active September 25, 2023 13:09
Interactive Bézier curves with Python using just matplotlib.
import matplotlib
matplotlib.use('webagg')
import numpy as np
from scipy.special import binom
import matplotlib.pyplot as plt
from matplotlib.lines import Line2D
@astrojuanlu
astrojuanlu / lineas_corriente.ipynb
Created November 9, 2012 15:52
Líneas de corriente con matplotlib 1.2
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@haplo
haplo / json_encoder.py
Created October 24, 2012 17:10
Custom JSONEncoder
from decimal import Decimal
try:
import simplejson as json
except ImportError:
import json
from django.utils.functional import Promise
class CustomJSONEncoder(json.JSONEncoder):
@StanAngeloff
StanAngeloff / simple-imagediff.py
Created February 1, 2012 11:45
Simple Image Diff for Git
#!/usr/bin/env python
# Simple Image Diffs
# ==================
#
# How to Install
# --------------
#
# Download the script somewhere on $PATH as 'simple-imagediff' with +x:
#
@haplo
haplo / .bashrc
Created March 12, 2010 11:47
Nice git prompt for bash
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
function parse_git_branch {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo " ("$(parse_git_dirty)${ref#refs/heads/}")"
}
BLUE="\[\033[1;34m\]"