Skip to content

Instantly share code, notes, and snippets.

@ramnathv
ramnathv / README.md
Created September 14, 2013 15:07
rCharts + Leaflet + KML

This is a demo of using rCharts to create a Leaflet map using KML. It requires you to install the latest dev branch of rCharts, which can be done using install_github("rCharts", "ramnathv", ref = "dev"). The code to reproduce this chart is shown below

# download kml example file
require(downloader)
download(
  url = "http://harrywood.co.uk/maps/examples/leaflet/mapperz-kml-example.kml",
  destfile = "mapperz-kml-example.kml"
)
@treby
treby / KaomojiSFChecker.ino
Created May 17, 2012 19:16
Read FeliCa system of 0x0003 and show Kaomoji
#include <LiquidCrystal.h>
#include <NewRCS620S.h>
#define COMMAND_TIMEOUT 400
#define POLLING_INTERVAL 500
#define LED_PIN 13
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
NewRCS620S rcs620s;
int waitCardReleased = 0;
// M5Stack Text-to-Speech demo using AquesTalk pico for ESP32
// see: http://blog-yama.a-quest.com/?eid=970188
#include <M5Stack.h>
#include "driver/i2s.h"
#include "aquestalk.h"
#define LEN_FRAME 32
uint32_t workbuf[AQ_SIZE_WORKBUF];
void setup() {
@uribo
uribo / jp_chome_boundary.R
Created July 14, 2017 00:08
国勢調査 小地域 Shapefileのダウンロード
library(RSelenium)
library(sf)
library(leaflet)
select_pref <- function(target) {
jpndistrict::jpnprefs %>%
dplyr::select(code = jis_code, pref = prefecture) %>%
dplyr::filter(code == target | pref == target)
}
select_city <- function(ch_elm = childElems3, target = NULL) {
@ksasao
ksasao / 0_talking_watch.ino
Last active July 18, 2019 11:13
Talking wrist watch for M5Stack
// Talking wrist watch for M5Stack
// 2018/4/8 @ksasao
//
// see:
// https://twitter.com/meganetaaan/status/982258576361078784
// http://blog-yama.a-quest.com/?eid=970191
// prerequisite: AquesTalk pico for ESP32
// https://www.a-quest.com/download.html#a-etc
#include <M5Stack.h>
#include "avator.h"
@YamadaKyohei
YamadaKyohei / ContactTracingAppFinder.ino
Last active August 13, 2020 12:16 — forked from ksasao/ContactTracingAppFinder.ino
@ksasaoさんのスケッチをM5StickC用に変更したもの。付近のCOCOAユーザ数をLCDに表示します。
#include <M5StickC.h>
#include <BLEDevice.h>
// Contact Tracing Bluetooth Specification (Apple/Google)
// https://blog.google/documents/58/Contact_Tracing_-_Bluetooth_Specification_v1.1_RYGZbKW.pdf
const char* uuid = "0000fd6f-0000-1000-8000-00805f9b34fb";
unsigned int count = 0;
class MyAdvertisedDeviceCallbacks: public BLEAdvertisedDeviceCallbacks {
void onResult(BLEAdvertisedDevice advertisedDevice) {
@eyecatchup
eyecatchup / update-to-php5.6-on-ubuntu-14.04.sh
Created April 4, 2017 08:22
Update PHP 5.x to PHP 5.6 on Ubuntu 14.04
#!/bin/sh
# In case df shows >90% for /boot run:
#sudo apt-get autoremove
# Add repository
sudo add-apt-repository ppa:ondrej/php
# Install required packages
sudo apt-get update
@Akiyah
Akiyah / jibanyan_equation
Created November 12, 2014 00:28
jibanyan_equation
jibanyan_equation <- function(x,y) {
min(max(min(1-(x/108)^2-(y/94)^2,y),min(1-((abs(x)-119)/103)^2-((y-56)/86)^2,1-((abs(x)-15)/77)^2-((y-119)/100)^2),1-((abs(x)-42)/66)^2-(y/55)^2,min(55+y,51-abs(x),-y)),3*abs(y-100)-2*(x-75)) *
min(min(max(min(1-(x/106)^2-(y/92)^2,y),min(1-((abs(x)-119)/101)^2-((y-56)/84)^2,((abs(x)-99)/40)^2+((y-54)/86)^2-1,92-abs(x)),1-((abs(x)-42)/64)^2-(y/53)^2),min(((abs(x)-52)/26)^2+((y+28)/26)^2-1,((abs(x)-51)/13)^2+(y/13)^2-1,max(abs(x)-51,y))),abs(x/51+10/51*sin(abs(y/61.2)^(1.2)*pi*(7/2)))^(2/3)+abs(y/61.2)^(2/3)-1) *
min(1-(x/32)^2-((y+30)/32)^2,1-((abs(x)+5)/22)^2-((y-18)/22)^2) *
min(1-((abs(x)-18)/20)^2-((y+10)/20)^2,((abs(x)-20)/22)^2+((y+7)/20)^2-1) *
(1-((abs(x)-51)/11)^2-(y/11)^2)
}
x <- seq(-150, 150, length=400)
z <- outer(x,x, Vectorize(jibanyan_equation))
@chsh
chsh / mastodon-sources.md
Last active August 24, 2022 15:30
mastodonのソースコード一覧

mastodonのソースコード一覧

pawoo.netやfriends.nicoなどのように、大手企業がmastodonインスタンスを提供し始めています。 それぞれは独自の拡張を行い、魅力を高めています。 mastodonそのものはAGPLのため、改変したソースコードが入手できるようにする必要がありますが、その一覧があったらいいかなと思ってまとめることにしました。 とは言え、私が知っているのはごく一部。もしみかけたら @chsh@bookn.me へのメンションにてお知らせください。

インスタンス

提供会社(団体・個人) インスタンスURL ソースコードURL 本家masterからの差分 追加日
ピクシブ 🐘 https://pawoo.net/ :octocat: pixiv/mastodon/tree/pawoo 📊 2017/4/23
@hussfelt
hussfelt / README.md
Last active October 13, 2022 07:03
Dashing widget to display an iframe with specified src

dashing-iframe

IFrame plugin for dashing

Description

Dashing widget to display an iframe with specified src

Installation

Create the folder iframe in the /widgets/ directory. Put the files iframe.coffee, iframe.html and iframe.scss in that folder.