Skip to content

Instantly share code, notes, and snippets.

View jskopek's full-sized avatar
🇨🇦
Canadian

Jean-Marc Skopek jskopek

🇨🇦
Canadian
View GitHub Profile
void setup() {
circle(50, 50, 10);
}
void draw() {
}
void setup() {
circle(50, 50, 10);
}
void draw() {
}
// A basic everyday NeoPixel strip test program.
// NEOPIXEL BEST PRACTICES for most reliable operation:
// - Add 1000 uF CAPACITOR between NeoPixel strip's + and - connections.
// - MINIMIZE WIRING LENGTH between microcontroller board and first pixel.
// - NeoPixel strip's DATA-IN should pass through a 300-500 OHM RESISTOR.
// - AVOID connecting NeoPixels on a LIVE CIRCUIT. If you must, ALWAYS
// connect GROUND (-) first, then +, then data.
// - When using a 3.3V microcontroller with a 5V-powered NeoPixel strip,
// a LOGIC-LEVEL CONVERTER on the data line is STRONGLY RECOMMENDED.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<base href="https://docraptor.com/">
<title>Five Things You Should Know About HTML5 - Dive Into HTML5</title>
<link rel="stylesheet" href="/samples/diveintohtml5.screen.css">
<style>
h1:before {
using System;
using System.Collections.Generic;
using System.Text;
namespace AzureMediaServicesEncoderNetCore.Services
{
class MediaServices
{
}
}
using System;
namespace AzureMediaServicesEncoderNetCore
{
class Program
{
static void Main(string[] args)
{
// this is a big no-no in practice! never hard-code sensitive data or commit it to a repository
// a better approach would be to use a ConfigurationBuilder instance:
@jskopek
jskopek / Program.cs
Last active April 22, 2018 03:59
.NET Core Azure Media Services SDK Example
using Azure.MediaServices.Core;
using System;
namespace AzureMediaTool
{
class Program
{
static void Main(string[] args)
{
string tenantDomain = "--";
// Patch the a `track` method on the mixpanel library
// This method is identical to `mixpanel.track`, but it executes the callback if mixpanel has not returned within 350ms
// Addresses an issue in the mixpanel library where the library has not been loaded (becuase of a timeout or blocked by ad blocker),
// and the initialized version is used instead. Due to a bug in the mixpanel loader, callbacks are never triggered when this occurs
var unpatchedMixpanelTrack = mixpanel.track;
mixpanel.track = function(event_name, properties, callback) {
if(!callback) {
return unpatchedMixpanelTrack(event_name, properties);
} else {
// make it 50ms over mixpanel's default 300ms callback timeout
@jskopek
jskopek / .vimrc
Last active October 11, 2018 20:31
Vim config
syntax on
filetype plugin indent on
" Set a backup directory
" silent !mkdir ~/.vim/tmp > /dev/null 2>&1 set backupdir=~/.vim/tmp
set noswapfile
" Source the vimrc file after saving it
" via: http://vimcasts.org/episodes/updating-your-vimrc-file-on-the-fly/
if has("autocmd")
class BinaryTreeNode(object):
value = None
left = None
right = None
def __init__(self, value):
self.value = value
def generate_dot_diagram(self, graph=None):
if not graph: