Skip to content

Instantly share code, notes, and snippets.

@oparrish
oparrish / audio_tag.rb
Created March 6, 2012 15:55
Jekyll tag plugin for creating HTML 5 audio element based on a list of source files
module Jekyll
class AudioTag < Liquid::Tag
def initialize(tag_name, files, tokens)
super
@files = files
end
def render(context)
HTML << '<audio controls="controls">'
@dhavaln
dhavaln / camera.html
Created March 29, 2012 14:33
Phonegap Camera Capture Example
<!DOCTYPE html>
<html>
<head>
<title>Capture Photo</title>
<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1"/>
<script type="text/javascript" charset="utf-8" src="js/phonegap.js"></script>
<script type="text/javascript" charset="utf-8">
var pictureSource; // picture source
var destinationType; // sets the format of returned value
@tabletick
tabletick / audio_tag.rb
Created September 6, 2012 10:08
Audio/MP3 Plugin for Octopress
# Title: MP3 tag for Jekyll
# Authors: Devin Weaver, Daniel Roos (youtube changes)
# Description: Allows mp3 tag to include mp3 files embedded into the post.
# It uses the player 'audio.js' from http://kolber.github.com/audiojs/
#
# Install the plugin according to the manuel of the author by adding the necessary lines to the head-template
# and adding the files into the right directories.
#
# Please read my [blog post about it][2].
#
@sloria
sloria / bobp-python.md
Last active July 24, 2024 02:53
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@simonista
simonista / .vimrc
Last active July 21, 2024 14:41
A basic .vimrc file that will serve as a good template on which to build.
" Don't try to be vi compatible
set nocompatible
" Helps force plugins to load correctly when it is turned back on below
filetype off
" TODO: Load plugins here (pathogen or vundle)
" Turn on syntax highlighting
syntax on
@Kartones
Kartones / postgres-cheatsheet.md
Last active July 24, 2024 21:30
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@REAS
REAS / RGB_textures.pde
Created May 20, 2014 23:01
Stochastic RGB textures
import processing.pdf.*;
color[] rgb = {
#FF0000, #00FF00, #0000FF
};
//SPACING BETWEEN LINES
float spMin = 2;
float spMax = 4;
float strokeWidth = 0.5;
@staltz
staltz / introrx.md
Last active July 22, 2024 09:31
The introduction to Reactive Programming you've been missing
@AminaKeldibek
AminaKeldibek / Multiple camera calibration procedure.md
Last active March 12, 2022 08:31
Multiple camera calibration

The document provides description on calibration of three Kinect for Microsoft sensors connected to one computer with several usb controllers. Three cameras setup is shown below:

![Figure 1] (http://i.imgur.com/sdOWbVl.jpg)

Intrinsic, extrinsic, and Kinect2Kinect calibration is performed to know the position of each sensor in the space. Our setup is ROS Indigo with Ubuntu 14.04. freenect_launch and camera_pose ROS packages are used. Camera_pose package provides the pipeline to calibrate the relative 6D poses between multiple camera's. freenect_launch package contains launch files for using OpenNI-compliant devices in ROS. It creates a nodelet graph to transform raw data from the device driver into point clouds, disparity images, and other products suitable for processing and visualization. It is installed with catkin as follows:

# Prep
@cucmberium
cucmberium / gist:8ca7f4a5c5ea5a8b6590
Last active May 11, 2019 16:40
Twitter poll api

twitterの投票

コード

var status = await tokens.Statuses.ShowAsync(id => 696716686381027328, include_cards => true, cards_platform => "Android-12");

https://api.twitter.com/1.1/statuses/show.json?id=696716686381027328&include_cards=true&cards_platform=Android-12

Twitter for AndroidのCK/CS