Skip to content

Instantly share code, notes, and snippets.

View knanne's full-sized avatar
💭
drinking coffee ☕️

Kain Nanne knanne

💭
drinking coffee ☕️
View GitHub Profile
@bortzmeyer
bortzmeyer / gist:1284249
Created October 13, 2011 13:42
The only simple way to do SSH in Python today is to use subprocess + OpenSSH...
#!/usr/bin/python
# All SSH libraries for Python are junk (2011-10-13).
# Too low-level (libssh2), too buggy (paramiko), too complicated
# (both), too poor in features (no use of the agent, for instance)
# Here is the right solution today:
import subprocess
import sys
@joelverhagen
joelverhagen / README.md
Created February 12, 2012 02:14
Jekyll YouTube Embed Plugin

This is a plugin meant for Jekyll.

Example use:

Easily embed a YouTube video. Just drop this file in your _plugins directory.

{% youtube oHg5SJYRHA0 %}
@iwek
iwek / csv-to-json.js
Last active July 5, 2024 14:29
CSV to JSON Conversion in JavaScript
//var csv is the CSV file with headers
function csvJSON(csv){
var lines=csv.split("\n");
var result = [];
var headers=lines[0].split(",");
for(var i=1;i<lines.length;i++){
@lazypower
lazypower / google-plus-blog-comments.md
Last active July 11, 2018 15:11
Quickie writeup on how to do Google+ Comments

So you want Google+ Comments on your blog

Edit your website code and add this HTML:

<script src="https://apis.google.com/js/plusone.js">
</script>
<g:comments
    href="[URL]"
    width="642"

first_party_property="BLOGGER"

@Hugovdberg
Hugovdberg / altair_interactive.tpl
Created August 3, 2018 12:58
nbconvert template with support for (interactive) altair plots
{% extends 'full.tpl' %}
{% block header %}
<script src="https://cdn.jsdelivr.net/npm/vega@3"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-lite@2"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-embed@3"></script>
{{super()}}
{% endblock header %}
{%- block data_priority scoped -%}
@Hugovdberg
Hugovdberg / altair_interactive_multi.tpl
Last active March 16, 2019 12:04
nbconvert template for altair/vegalite output to html, with a hacky way to ensure unique visualisation numbers
{% extends 'full.tpl' %}
{% set altair = {'vis_number': 0} %}
{% block header %}
<script src="https://cdn.jsdelivr.net/npm/vega@3"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-lite@2"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-embed@3"></script>
{{super()}}
{% endblock header %}