Skip to content

Instantly share code, notes, and snippets.

View mactkg's full-sized avatar
💭
I may be slow to respond.

mactkg mactkg

💭
I may be slow to respond.
View GitHub Profile
//===============================
// arduino
//===============================
void setup(){
Serial.begin(9600);
pinMode(13,INPUT);
}
void loop(){
/*
hatenaCardBackgroundChanger
@3846masa
iframeの属性にbackgroundを追加してcss方式で書くとなる(多分)。
*/
window.addEventListener('load',function(){
var list = document.querySelectorAll('iframe[src*="http://hatenablog.com/embed"][background]');
Array.prototype.forEach.call(list, function(node){
@mactkg
mactkg / 0_reuse_code.js
Last active August 29, 2015 14:13
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@mactkg
mactkg / .vimrc
Last active August 29, 2015 14:25 — forked from michaelfox/vimrc
Basic / Simple vimrc config file
set nocompatible
set encoding=utf-8
set hidden
filetype plugin indent on
syntax on
set synmaxcol=2048 " Don't syntax highlight super-long lines (for performance)
set autoindent " automatically indent lines and try to do it intelligently
set smartindent
set backspace=indent,eol,start " backspace behaves 'normally'
// ==Taberareloo==
// {
// "name" : "Fix Tumblr.getTumblelogs 2015.04"
// , "description" : "Fix Tumblr.getTumblelogs 2015.04"
// , "include" : ["background"]
// , "version" : "0.1.2"
// , "downloadURL" : "https://gist.github.com/mactkg/d19a5421c55fa40f5799/raw/ca2da60df200603d322cc7fcafb76eda1febc37f/patch.fix.tumblr.getTumblelogs.tbrl.js"
// }
// ==/Taberareloo==
#include <math.h>
#define _USE_MATH_DEFINES
#include <iostream>
double LengthCos(double t1,t2,t3,f1,f2,f3) {
return sqrt(((t1-f1)*(t1-f1)+(t3-f3)*(t3-f3)))/sqrt(((t1-f1)*(t1-f1)+(t2-f2)*(t2-f2)+(t3-f3)*(t3-f3)));
}
double LengthDegree(double t1,t3,f1,f3) {
return sqrt((t1-f1)*(t1-f1))/sqrt(((t1-f1)*(t1-f1)+(t3-f3)*(t3-f3)));
@mactkg
mactkg / shibuya_ni.txt
Created June 2, 2011 11:25 — forked from fullmated/shibuya_ni.txt
shibuya_ni
一歳半のちびっ子が認識しない件
Kinect本はKinect-Hackにぴったりです
OpenNI
Generator
MetaData
NITE
Session
Detector
idea
@mactkg
mactkg / shibuya_ni.txt
Created June 2, 2011 12:04 — forked from fullmated/shibuya_ni.txt
shibuya_ni
一歳半のちびっ子が認識しない件
Kinect本はKinect-Hackにぴったりです
OpenNI
Generator
MetaData
NITE
Session
Detector
idea
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8" />
<title>mind-catch</title>
<script type="text/javascript" src="./jquery-1.7.min.js"></script>
<script type="text/javascript">
var canvas;
var context;
var socket;
#include<stdio.h>
main(){
unsigned long long a[3]={0L,1L,1L},b,c=0;
printf("%d\n%d\n",a[1],a[2]);
for(b=0;b-98;b++){
c=0;
a[b%3]=a[(b+1)%3]+a[(b+2)%3];
if(!(a[b%3]%3))printf("Fizz"),c=1;
if(!(a[b%3]%5))printf("Buzz"),c=1;
if(!c)printf("%lld",a[b%3]);