Skip to content

Instantly share code, notes, and snippets.

View damondouglas's full-sized avatar
💭
😼

Damon damondouglas

💭
😼
  • Google, Inc.
View GitHub Profile
$lightgray : #819090;
$gray : #708284;
$mediumgray : #536870;
$darkgray : #475B62;
$darkblue : #0A2933;
$darkerblue : #042029;
$paleryellow : #FCF4DC;
$paleyellow : #EAE3CB;
$yellow : #A57706;
$orange : #BD3613;
#!/usr/bin/env python
__author__ = 'Charles Hooper <charles.hooper@dotcloud.com>'
import socket, ssl
socket.setdefaulttimeout(3)
class EasySSLWrap(object):
"""Connect over TCP+SSL using a context manager.
Usage:

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

Google+ Domains API - Quick Start

introduction

Google+ Domains API are meant to interact with your G+ accounts in the domain. With these APIs you can manage circles, read and write posts, shares, and comments etc.. more informations here

This tutorial is for creating an application that uses the Domains API, running on Google App Engine with python.

create GAE (Google App Engine) app

"""
Simple python script to upload a file to Trello.
This script is a demo - done to show how to do it - it doesn't have
much practical purpose as it requires the use of a number of tokens
and identifiers which you can only get programmatically or by visiting
the website (in which case you may as well upload the attachment directly.)
You should read the Trello API docs prior to using this:
https://trello.com/docs/gettingstarted/index.html
class Graph:
def __init__(self):
self.nodes = set()
self.edges = defaultdict(list)
self.distances = {}
def add_node(self, value):
self.nodes.add(value)
def add_edge(self, from_node, to_node, distance):
@damondouglas
damondouglas / index.html
Last active January 30, 2016 02:10 — forked from anonymous/index.html
selecting node dart
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>noisy-cell-0803</title>
<script type="application/dart" src="main.dart"></script>
</head>
@damondouglas
damondouglas / bash-colors.md
Created May 30, 2017 02:43 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
@damondouglas
damondouglas / gophernotes.md
Created December 22, 2019 00:43 — forked from korakot/gophernotes.md
Using Golang kernel in Colab

Run this from a normal Python notebook to install Golang kernel

!apt install golang-go libzmq3-dev
%env GOPATH=/root/go
!go get -u github.com/gopherdata/gophernotes
!cp ~/go/bin/gophernotes /usr/bin/
!mkdir /usr/local/share/jupyter/kernels/gophernotes
!cp ~/go/src/github.com/gopherdata/gophernotes/kernel/* \
       /usr/local/share/jupyter/kernels/gophernotes
@damondouglas
damondouglas / readme.md
Created February 6, 2020 20:45 — forked from maxivak/readme.md
Restore repo from Gitlab bundle file

Gitlab exports repositories to tar archive which contains .bundle files.

We have repo.bundle file and we want to restore files from it.

  • create bare repo from bundle file
git clone --mirror myrepo.bundle my.git