Skip to content

Instantly share code, notes, and snippets.

#さくらVPS Ubuntu16.04 Docker
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo adduser mastodon
$ sudo gpasswd -a mastodon sudo
# /etc/iptables/iptables.rules
@vim13
vim13 / .vimrc
Created December 29, 2015 15:45
my .vimrc
syntax enable
set number
colorscheme desert
" NeoBundle --------------------------
if 0 | endif
filetype off
@vim13
vim13 / SWITCH_LED.ino
Created December 29, 2015 15:44
Arduinoを始めよう 第二版 Massimo Banzi O'REILLY p.41
const int LED = 12;
const int BUTTON = 7;
int val = 0;
int old_val = 0;
int state = 0;
void setup() {
pinMode(LED, OUTPUT);
pinMode(BUTTON, INPUT);
@vim13
vim13 / gaki.py
Created August 23, 2015 18:46
ガキの使い番組内容tweet
#!/usr/local/bin/python
#vim:fileencoding=utf-8
import re
import time
import urllib2
from pit import Pit
import tweepy
import BeautifulSoup
@vim13
vim13 / lastfm.py
Created January 30, 2015 22:37
last.fmでloveしたものをYouTube urlつきでtweet
#!/usr/local/bin/python
#vim:fileencoding=utf-8
import re
import codecs
import time
import urllib2
from pit import Pit
import tweepy
import BeautifulSoup
@vim13
vim13 / life.js
Created September 15, 2013 18:48
ライフゲーム
var SCREEN_WIDTH = 848;
var SCREEN_HEIGHT = 576;
var SIDE_CELLS = 300;
var CELL_SIZE = SCREEN_WIDTH / SIDE_CELLS;
var FPS = 10;
var canvas;
var context;
window.onload = function() {
@vim13
vim13 / noise.js
Created September 15, 2013 18:46
チカチカ
var SCREEN_SIZE = 500; //x
var SIDE_CELLS = 200;
var CELL_SIZE = SCREEN_SIZE / SIDE_CELLS;
var FPS = 50;
var canvas;
var context;
window.onload = function() {
var field = new Array(SIDE_CELLS*SIDE_CELLS);
@vim13
vim13 / main.js
Last active December 23, 2015 03:09 — forked from yat1ma30/main.js
var SCREEN_SIZE = 500; // キャンバスの幅
var SIDE_CELLS = 200; // 一辺のセルの数
var CELL_SIZE = SCREEN_SIZE / SIDE_CELLS; // セルの幅
var FPS = 10; // フレームレート
var canvas; //= document.getElementById('world');
var context; //= canvas.getContext('2d');
window.onload = function() {
var field = new Array(SIDE_CELLS*SIDE_CELLS); // フィールド情報
var tempField = new Array(SIDE_CELLS*SIDE_CELLS); // フィールド情報の一時記憶用
@vim13
vim13 / dmm.py
Last active December 21, 2015 14:09
エロいね!Twitter連動
#!/usr/local/bin/python
#vim:fileencoding=utf-8
import re
import time
import urllib2
from pit import Pit
import tweepy
import BeautifulSoup
#!/usr/local/bin/python
#vim:fileencoding=utf-8
import re
import cgi
import os
import Cookie
import sys
sys.path.append('hoge')
import tweepy