Skip to content

Instantly share code, notes, and snippets.

@tektoh
tektoh / .bashrc
Created May 12, 2020 01:36
dropboxignore
function dropboxignore() {
dropboxignore=~/Downloads/dropboxignore
if [ ! -e "$dropboxignore$PWD/$1" ]; then
mkdir -pv $dropboxignore$PWD
mv -v $1 $dropboxignore$PWD/$1
fi
ln -Fsv $dropboxignore$PWD/$1
}
@tektoh
tektoh / Makefile.makefile
Created February 6, 2015 00:47
DOT(Graphviz)をPNGにするMakefile
DOTFILES = $(wildcard *.dot)
PNGFILES = $(DOTFILES:.dot=.png)
.SUFFIXES: .png .dot
.dot.png:
dot -Tpng $< > $@
png: $(PNGFILES)
@tektoh
tektoh / hhvm_php.ini
Last active August 29, 2015 14:10
Configure: Nginx+HHVM+Concrete5
; php options
session.save_handler = files
session.save_path = /var/lib/php5
session.gc_maxlifetime = 1440
short_open_tag = On
expose_php = Off
; hhvm specific
hhvm.log.level = Warning
@tektoh
tektoh / layout.php
Created November 11, 2014 05:46
CakePHP2 インラインJavaScript
<?= $this->Html->script('jquery') ?>
<?= $this->fetch('script'); ?>
root = true
[*]
indent_style = tab
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8
[Vagrantfile]
@tektoh
tektoh / index.html
Last active August 29, 2015 14:09
AngularJS+Bootstrapテンプレート
<!DOCTYPE html>
<html ng-app="myApp">
<head>
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
</head>
<body>
<div class="container" ng-controller="testCtrl">
</div><!-- /.cintainer -->
<script src="//code.jquery.com/jquery-2.1.1.min.js"></script>
@tektoh
tektoh / gist:832f4eb337401ac88699
Created June 28, 2014 04:32
20140628 - 旅好きエンジニアもくもく会 foursquare api をさわってみる。
<?php
use Cake\Network\Http\Client;
public function fsq() {
$client = new Client();
$url = 'https://api.foursquare.com/v2/venues/search';
$res = $client->get($url, [
'll' => '44.3,37.2',
'client_id' => 'クライアントID',
'client_secret' => 'シークレットキー',