Skip to content

Instantly share code, notes, and snippets.

@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;
@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"
)
@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))
@janjongboom
janjongboom / gist:94d575526a689687a6b8
Last active February 24, 2023 14:40
Firefox OS / JanOS on Raspberry Pi with GPIO support

This does NOT work on Raspberry Pi 2!

  1. Obtain a 8GB (or bigger) SD Card
  2. Download disk image from http://janos.io/builds/fxos-pi-gpio.img.zip and unzip
  3. Put SD card in your computer
  4. Find out where your SD card is mounted (BE REALLY SURE ITS THE RIGHT DEVICE, IT WILL BE WIPED COMPLETELY!!!), f.e. /dev/disk5 on OSX
  5. On Linux, run: sudo dd bs=4M if=fxos-pi-gpio.img of=/path/to/your/disk
  6. On OSX, run: sudo dd bs=4m if=fxos-pi-gpio.img of=/dev/rdisk5 (do rdisk, not disk here!)
  7. When it's done put it in your Pi and start up
  8. The demo's are wired like this: yellow LED on GPIO2, red LED on GPIO3, button (wire it as pulldown) on GPIO26.
@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.

@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
@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
@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) {
// 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() {
@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"