Skip to content

Instantly share code, notes, and snippets.

View winder's full-sized avatar
😑
why is this a feature

Will Winder winder

😑
why is this a feature
View GitHub Profile
@winder
winder / conduit.yml
Last active July 7, 2023 12:56
Conduit Private Network
# Log verbosity: PANIC, FATAL, ERROR, WARN, INFO, DEBUG, TRACE
log-level: INFO
# If no log file is provided logs are written to stdout.
#log-file:
# Number of retries to perform after a pipeline plugin error.
retry-count: 10
# Time duration to wait between retry attempts.
@winder
winder / conduit.yml
Last active April 23, 2024 06:39
Indexer API: algod follower, conduit, postgres, indexer-api
# Log verbosity: PANIC, FATAL, ERROR, WARN, INFO, DEBUG, TRACE
log-level: INFO
# If no log file is provided logs are written to stdout.
#log-file:
# Number of retries to perform after a pipeline plugin error.
retry-count: 10
# Time duration to wait between retry attempts.
@winder
winder / oled.h
Last active March 14, 2022 05:09
QMK Modifier Stripes for OLED Display
// include the static image variable
// static const char display [] PROGMEM
#include "images.h"
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return OLED_ROTATION_0;
}
// helper to shift bits across an array.
void shiftright(char* buf, int size, int num) {
@winder
winder / Example.java
Created January 3, 2020 15:10
AWS S3 JFileChooser
public final class Example {
final static String access = "access-id-here";
final static String secret = "secret-key-here";
public static void main(String[] args) throws Exception {
S3FileSystemView viewer = new S3FileSystemView(access, secret);
JFileChooser chooser = new JFileChooser("s3:/", viewer);
int returnVal = chooser.showOpenDialog(new JFrame());
@winder
winder / instagram_scraping_test.py
Created April 10, 2018 19:01
Instagram Scraper April 10 2018
#!/usr/bin/env python3
import requests
import urllib.parse
import hashlib
import json
#CHROME_UA = 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36'
CHROME_UA = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36'
def getSession(rhx_gis, csrf_token, variables):
@winder
winder / testfactory.java
Last active November 3, 2017 18:53
TestFactory Example
@TestFactory
public Stream<DynamicTest> dynamicNextTrackMetricsWeeklyTests() {
final DateTime now = DateTime.now();
int thisMonthLength = YearMonth.now().lengthOfMonth();
// Week 2-4, track weekly
return IntStream.rangeClosed(7, thisMonthLength)
.boxed()
.map(i -> {
Date published = now.minusDays(i).toDate();
FollowerConfig tc = FollowerConfig.builder()
.listener(new TestListener())
.initialExport(true)
.mongoConnectionString("mongodb://login:password@localhost:27017")
.mongoDatabase("cyberdyne")
.mongoCollection("skynet")
.oplogFile("/tmp/testapp/oplog_timestamp")
.build();
Runner.run(tc);
public class TestListener implements MongoEventListener {
@Override
public void exportDocument(Document doc) {
System.out.println("Export: " + doc.toString());
}
@Override
public void delete(Delete entry) {
System.out.println("Delete: " + entry.getId());
}
<dependency>
<groupId>com.traackr</groupId>
<artifactId>mongo-follower</artifactId>
<version>1.0.1</version>
</dependency>
Looking up unique issues in range: rev-1.54 ... rev-1.53
=======================================================
= Came across some commits which couldn't be parsed: =
=======================================================
Merge branch 'release/1.54'
Gitflow: Prepping for release
...