Skip to content

Instantly share code, notes, and snippets.

@deslee
deslee / designer.html
Last active August 29, 2015 14:09
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../paper-radio-group/paper-radio-group.html">
<link rel="import" href="../paper-radio-button/paper-radio-button.html">
<link rel="import" href="../topeka-elements/theme.html">
@deslee
deslee / designer.html
Last active August 29, 2015 14:09
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<link rel="import" href="../google-map/google-map.html">
getRandomPun(): Promise<Pun> {
return this.client.db('punbot').collection('puns').aggregate([
{ '$sample': { 'size': 1 } }
]).toArray().then(result => {
if (result.length) {
return result[0];
}
return undefined;
}).catch(err => {
console.error(err);
import { WebClient } from '@slack/client'
postMessage(teamData: TeamData, channel: string, text: string): Promise<any> {
const web = new WebClient(teamData.bot.bot_access_token);
return web.chat.postMessage({
channel: channel.substring(2, channel.length-1),
text: text
})
}
@deslee
deslee / black.css
Last active December 7, 2018 22:16
body { background: #222; color: #e6e6e6; }
a { color: #949494; }
a:link, a:visited { color: #949494; }
a:hover, a:active, a:focus { color: #c7c7c7; }
hr { border-bottom: 1px solid #424242; border-top: 1px solid #222; }
using System;
using Microsoft.EntityFrameworkCore;
using System.Collections.Generic;
using System.Linq;
namespace ef_play
{
class Program
{
public class Blog
using System;
using Microsoft.EntityFrameworkCore;
using System.Collections.Generic;
using System.Linq;
namespace ef_play
{
class Program
{
public class Blog
import React, { useState, useEffect, useRef } from 'react';
const states = {
PromptUserToMovePointer: "Move your cursor around",
PromptUserToHoldStill: "Hold still!",
DisplayingCat: "Displaying cat..."
}
export default ({ }) => {
const [uiState, setUiState] = useState(states.PromptUserToMovePointer)

Keybase proof

I hereby claim:

  • I am deslee on github.
  • I am desmondl (https://keybase.io/desmondl) on keybase.
  • I have a public key ASCLSO1RCJDwpykzSivQuOfgOCSQFVCHWKcak6Aj1Q1BLQo

To claim this, I am signing this object:

# Simple test for NeoPixels on Raspberry Pi
import threading
import board
import neopixel
import colorsys
from random import randint
def hsv2rgb(h,s,v):
return tuple(round(i * 255) for i in colorsys.hsv_to_rgb(h,s,v))