Skip to content

Instantly share code, notes, and snippets.

View nikuuchi's full-sized avatar

uchida nikuuchi

  • Tokyo, Japan
View GitHub Profile
@nikuuchi
nikuuchi / resolution_1600x900.sh
Created January 6, 2013 03:31
VMwareで1600x900の解像度をなぜか使えなかったから作った。2行目はcvtで生成。
#!/bin/sh
xrandr --newmode "1600x900_60.00" 118.25 1600 1696 1856 2112 900 903 908 934 -hsync +vsync
xrandr --addmode Virtual1 1600x900_60.00
xrandr --output Virtual1 --mode 1600x900_60.00
@nikuuchi
nikuuchi / ubuntu.sh
Last active December 13, 2015 19:58
Ubuntuで開発環境整える用。 Ubuntu 13.10で確認。
#!/bin/bash
cd $HOME
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install vim tmux zsh build-essential cmake cmake-curses-gui python-setuptools git tig subversion clang llvm emscripten default-jdk -y
# server
#sudo tasksel install lamp-server openssh-server
# Latex(for 12.10 or 13.04)
#sudo apt-get install texlive texlive-lang-cjk auctex xdvik-ja
@nikuuchi
nikuuchi / demo.coffee
Created February 22, 2013 08:46
Web Audio APIを少し触ってみたコード片
$ () ->
ctx = document.getElementById("demo").getContext("2d")
ctx.strokeStyle = "#000"
ctx.fillStyle = "#000"
for x in [0..8]
ctx.strokeRect x*80,0,80,280
for x in [60,140,300,380,460]
ctx.fillRect x,0,40,170
player = new Simulator()
$("#play").click () ->
@nikuuchi
nikuuchi / sendPost.php
Created March 28, 2013 07:01
file_get_contentsでPOSTする
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
if ( ! function_exists('send_post'))
{
function send_post($data,$url)
{
$header = array(
"Content-Type: application/x-www-form-urlencoded",
"Content-Length: ".strlen($data)
);
@nikuuchi
nikuuchi / qsort.js
Created April 4, 2013 05:29
quick sortを作ってみた in JavaScript
'use strict';
function quickSort(arr) {
if (arr.length === 0) {
return arr;
} else {
var p = arr[0],
xs = arr.slice(1);
var gts = [],
lts = [],
@nikuuchi
nikuuchi / README.md
Last active December 17, 2015 01:58
ase.sh

ADS のインストール

  1. ase.shを実行する
  2. AssuranceScriptEditor/client/config.php にURLを記入
  3. サーバ側にMySQLの設定

MySQLにユーザの作成

$ mysql -u root -p

mysql&gt; GRANT ALL PRIVILEGES ON *.* TO ユーザー名@localhost IDENTIFIED BY 'パスワード';
@nikuuchi
nikuuchi / ip.sh
Created June 18, 2013 05:10
ifconfigからipアドレスを切り出して表示
#!/bin/bash
ifconfig eth0 |grep inet | head -1 | awk '{print $1}' | sed -e 's/.*://'
@nikuuchi
nikuuchi / any.sh
Last active December 19, 2015 04:39
typescriptのソースコード中のanyの数をファイルごとに表示する
#!/bin/bash
grep any -r *.ts | sed -e 's/:.*$//g' | uniq -c
@nikuuchi
nikuuchi / util.py
Created November 19, 2013 07:51
簡単なfabricのutil
from fabric.api import local, env, run, sudo, cd
from fabric.decorators import task
import time
from datetime import date
env.use_ssh_config = True
env.user = 'FIXME'
env.password = 'FIXME'
@task
@nikuuchi
nikuuchi / fabfile.py
Created November 28, 2013 03:17
envの使い方メモ
from fabric.api import local, env, run, sudo, cd
from fabric.decorators import task
import time
from datetime import date
env.use_ssh_config = True
env.user = '******'
env.password = '******'
@task