This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First setup Ubuntu 20.04 on your SD card if you haven't already | |
# I assume by this point you have the Ubuntu SD card still in your laptop/pc | |
# We need to copy the cat tool to the SD card | |
# Download the installer here: https://cat.eduroam.org/ | |
# Add the cat installer to the pi SD card; run these commands on your laptop | |
mkdir /mnt/rpi | |
# Find the block device for your SD card. Be careful here -- you can mess up your OS if you choose the wrong device! | |
lsblk # You should see something like | |
# mmcblk0 259:0 0 15.4G 0 disk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int[][] result; | |
float t, c; | |
float ease(float p) { | |
return 3*p*p - 2*p*p*p; | |
} | |
float ease(float p, float g) { | |
if (p < 0.5) | |
return 0.5 * pow(2*p, g); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.sam016.vsflatomation.service.ble; | |
import java.util.HashMap; | |
import java.util.UUID; | |
public class AllGattCharacteristics { | |
private static HashMap<String, String> attributes = new HashMap(); | |
static { | |
attributes.put("00002a00-0000-1000-8000-00805f9b34fb", "Device Name"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import stat | |
import argparse | |
template_fcgi = '''#!/usr/bin/env python3 | |
from flup.server.fcgi import WSGIServer | |
from %s import app | |
class ScriptNameStripper(object): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PWindow extends PApplet { | |
PWindow() { | |
super(); | |
PApplet.runSketch(new String[] {this.getClass().getSimpleName()}, this); | |
} | |
void settings() { | |
size(500, 200); | |
} |
Homebrew is a package management system for OS X. You can read more about it here, or simply run
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
to install it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$location = get_field('location'); | |
if( !empty($location) ): | |
?> | |
<a href="http://www.google.com/maps/preview#!q=<?=urlencode( $location['address'] )?>"> | |
<img src="http://maps.googleapis.com/maps/api/staticmap?center=<?php echo $location['lat']; ?>,<?php echo $location['lng']; ?>&zoom=15&format=png&sensor=false&size=397x297&maptype=roadmap&visual_refresh=true&style=visibility:off&style=feature:road|element:geometry|visibility:simplified&style=feature:landscape|element:geometry|visibility:simplified&style=element:labels|visibility:on&markers=color:red|<?php echo $location['lat']; ?>,<?php echo $location['lng']; ?>"/> | |
</a> | |
<?php endif; ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <FastLED.h> | |
#define LED_PIN 3 | |
#define NUM_LEDS 30 | |
#define BRIGHTNESS 96 | |
#define LED_TYPE WS2811 | |
#define COLOR_ORDER GRB | |
CRGB leds[NUM_LEDS]; | |
#define UPDATES_PER_SECOND 100 |
Protune for DM series works for the DM422C stepper drive. If it doesn't work, you might want to try ProTuner_All_Previous. You must select the application made for DM422C (not DM422). Also works in Linux under Wine (even better than on Windows XP). The USB to serial adaptor must supply true RS232 logic levels. Using Prolific chipsets seems to be tricky. FTDI chipsets worked like a charm.
Wine needs a symlink to the serial port:
ln -s /dev/ttyUSB0 ~/.wine/dosdevices/com1
(Linux)
NewerOlder