Skip to content

Instantly share code, notes, and snippets.

const COLLECTION_URL = 'https://boardgamegeek.com/xmlapi2/collection?username=grapswiz';
const THING_URL = 'https://boardgamegeek.com/xmlapi2/thing';
function myFunction() {
const collectionResponse = UrlFetchApp.fetch(COLLECTION_URL);
const xmlDocs = XmlService.parse(collectionResponse.getContentText());
const items = xmlDocs.getRootElement().getChildren('item');
const ids = items.map((item) => item.getAttribute('objectid').getValue());
Logger.log(ids.length);
@grapswiz
grapswiz / dates.json
Created April 16, 2019 10:14
chrome release version
[
{
"version": 72,
"date": "2019-01-29T00:00:00.000Z",
"chromeOSDate": "2019-02-05T00:00:00.000Z"
},
{
"version": 73,
"date": "2019-03-12T00:00:00.000Z",
"chromeOSDate": "2019-03-19T00:00:00.000Z"
@grapswiz
grapswiz / image-fetcher.js
Last active May 29, 2023 17:37
fetch boardgame images from BGG
const Axios = require('axios');
const Path = require('path');
const Fs = require('fs');
const Url = require('url');
const OBJECT_ID = process.argv[2] || 230802;
const PAGE_NUMBER = process.argv[3] || 1;
const API_URL = `https://api.geekdo.com/api/images?ajax=1&gallery=all&nosession=1&objectid=${OBJECT_ID}&objecttype=thing&pageid=${PAGE_NUMBER}&showcount=50&size=thumb&sort=recent`;
@grapswiz
grapswiz / hello.gohtml
Created January 30, 2018 06:53
テンプレート
下に入る
{{include "hoge.html"}}
上に入る
@grapswiz
grapswiz / request
Last active November 30, 2017 03:42
try entitySentiment
GET https://language.googleapis.com/v1beta2/documents:analyzeEntitySentiment?key=xxxxx
{
"document":{
"type":"PLAIN_TEXT",
"content":"Chimera Station might seem like a simple worker placement game, but the evolving workers (that have awesome parts you put together) and the great combo plays makes it so much more. It's a great game that I highly recommend to any euro fans out there"
},
"encodingType":"UTF8"
}
$ dep ensure -update -v
Root project is "github.com/grapswiz/dfs"
3 transitively valid internal packages
4 external packages imported from 4 projects
(0) ✓ select (root)
(1) ? attempt github.com/mitchellh/go-homedir with 1 pkgs; 1 versions to try
(1) try github.com/mitchellh/go-homedir@master
(1) ✓ select github.com/mitchellh/go-homedir@master w/1 pkgs
(2) ? attempt github.com/spf13/cobra with 1 pkgs; 2 versions to try
@grapswiz
grapswiz / sh
Last active July 24, 2017 14:05
/etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
@grapswiz
grapswiz / main.md
Last active September 14, 2020 08:47
My Best 30 Boardgames

My Best 30 Boardgames

  1. Orleans
  2. Millennium Blades
  3. nokosu dice
  4. Carcassonne
  5. Super Motherload
  6. Valley Of The Kings
  7. Santorini 2016
  8. Junk Art
  9. Dominion
@grapswiz
grapswiz / app.js
Last active March 28, 2018 11:29
let printCharacteristic;
sendTextData = () => {
let encoder = new TextEncoder('utf-8');
};
document.querySelector("#requestButton").addEventListener("click", () => {
navigator.bluetooth.requestDevice({
filters: [{
services: ['000018f0-0000-1000-8000-00805f9b34fb']
<?xml version="1.0" encoding="utf-8"?>
<user id="957048" name="grapswiz" termsofuse="http://boardgamegeek.com/xmlapi/termsofuse">
<firstname value="gra" />
<lastname value="gra" />
<avatarlink value="N/A" />
<yearregistered value="2014" />
<lastlogin value="2015-08-23" />
<stateorprovince value="" />
<country value="" />
<webaddress value="" />