This file contains 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
from pybricks.pupdevices import Remote | |
from pybricks.parameters import Button, Color | |
from pybricks.hubs import TechnicHub | |
from pybricks.pupdevices import Motor | |
from pybricks.parameters import Port | |
from pybricks.tools import wait | |
hub = TechnicHub() |
This file contains 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
trigger: none | |
# trigger: | |
# branches: | |
# include: | |
# - feature/3809-faster-tests | |
#schedules: | |
# - cron: "*/15 * * * *" | |
# displayName: every 15 min build | |
# always: true |
This file contains 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
'use strict'; | |
const fs = require('fs'); | |
const path = require('path'); | |
const webpack = require('webpack'); | |
const resolve = require('resolve'); | |
const PnpWebpackPlugin = require('pnp-webpack-plugin'); | |
const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin'); | |
const InlineChunkHtmlPlugin = require('react-dev-utils/InlineChunkHtmlPlugin'); |
This file contains 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
var x = {} | |
csv.split("\n").slice(1).map(r => { | |
const [date, amount] = [r.split(";")[0], r.split(";")[5]].map(c => c.replace(/"/g, '')); | |
const [day] = date.split('-'); | |
x[day] = (x[day] || 0) + Number(amount); | |
}); | |
Object.keys(x).map(day => document.querySelector(`#d${day}-0`).value = x[day]); | |
console.log(x); |
This file contains 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
FROM openjdk:8-jdk | |
ENV ANDROID_HOME /opt/android-sdk-linux | |
RUN dpkg --add-architecture i386 | |
RUN apt-get update -qq | |
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y libc6:i386 libstdc++6:i386 libgcc1:i386 libncurses5:i386 libz1:i386 | |
This file contains 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
// +-\/-+ | |
// (+) VCC 1| |14 GND (-) | |
// coil 1 A00 2| |13 A10 low_pin | |
// coil 2 A01 3| |12 A09 high_pin | |
// RESET 4| |11 A08 | |
// coil 3 A02 5| |10 A07 button_input | |
// A03 6| |9 A06 led_cathode | |
// A04 7| |8 A05 led_anode | |
// +----+ | |
int low_pin = 10; |
This file contains 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
copy(Reflect.ownKeys(Reflect.getPrototypeOf(element)).filter(p=>element [p] instanceof Function).map(funcName => ` | |
suite('${funcName}()', () => { | |
test('yyyyy', () => { | |
assert.equal(element.${funcName}(''), 'xxxx'); | |
}); | |
}); | |
`).join('')) | |
/* sample output */ | |
suite('_getWeek', () => { |
This file contains 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
var express = require('express') | |
var app = express() | |
var port = 8081; | |
app.use(function(req, res, next) { | |
res.header("Access-Control-Allow-Origin", "*"); | |
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept"); | |
res.header("Access-Control-Allow-Methods", "POST, PUT, GET, OPTIONS"); | |
next(); | |
}); |
This file contains 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
image: chrisgunawardena/android-sdk-23-24:latest | |
variables: | |
ANDROID_COMPILE_SDK: "25" | |
ANDROID_BUILD_TOOLS: "24.0.0" | |
ANDROID_SDK_TOOLS: "23.0.3" | |
before_script: | |
- chmod +x ./gradlew |
This file contains 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
ssh -NT -R 12345:localhost:22 root@mqtt.chris.gunawardena.id.au -o ServerAliveInterval=60 | |
ssh -p12345 chris@localhost | |
https://blog.kylemanna.com/osx/ssh-reverse-tunnel-on-mac-os-x/ |
NewerOlder