Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
# -*- coding: utf-8 -*-
import csv
import codecs
import numpy as np
import MeCab
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.cluster import KMeans, MiniBatchKMeans
@ziadoz
ziadoz / CapsuleServiceProvider.php
Last active May 1, 2020 02:46
Laravel Eloquent/Capsule Silex Service Provicer
<?php
use Silex\Application;
use Silex\ServiceProviderInterface;
use Illuminate\Database\Capsule\Manager as Capsule;
use Illuminate\Events\Dispatcher;
use Illuminate\Container\Container;
use Illuminate\Cache\CacheManager;
class CapsuleServiceProvider implements ServiceProviderInterface
{
@thomaspark
thomaspark / subnav.css
Last active June 6, 2023 10:19
Subnav for Bootstrap 2
section {
padding-top: 60px;
}
.subnav {
margin-bottom: 60px;
width: 100%;
height: 36px;
background-color: #eeeeee; /* Old browsers */
background-repeat: repeat-x; /* Repeat the gradient */
@mardix
mardix / php-cs-fixer-pre-commit.php
Created September 4, 2012 17:06
A pre-commit hook to make PHP code PSR-2 compliant, check for syntax error
#!/usr/bin/php
<?php
/**
* .git/hooks/pre-commit
*
* This pre-commit hooks will check for PHP error (lint), and make sure the code
* is PSR compliant.
*
* Dependecy: PHP-CS-Fixer (https://github.com/fabpot/PHP-CS-Fixer)
*
@BlackKetchupTea512
BlackKetchupTea512 / sublimetext_default_settings.md
Created September 4, 2012 12:11
Sublime Text 2 のDefault設定ファイルについて

追記

この記事は古いです...。はてなブログの方に完全版を置いてあります。→ http://blue-ham-cake1024.hatenablog.com/entry/2012/09/07/Sublime_Text_2_のDefault設定ファイルを眺める


はてなブログは調子が悪いようなので。

この記事ではDefault設定ファイルにどのような記述がされているか、その記述にどんな意味があるかを一つ一つ見ていきます。実際に設定をカスタマイズしてみたい方は、メニューのPreferencesタブの"Settings - User"からUser設定ファイルを開いてそこでいろいろ試してみましょう。

@GedowFather
GedowFather / capacity-scheduler.xml
Created September 3, 2012 06:10
CDH4 configurations
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<!-- Setting up queues -->
<property>
<name>yarn.scheduler.capacity.root.queues</name>
<value>default,tree</value>
@yuya-takeyama
yuya-takeyama / README.md
Created August 24, 2012 11:17
複数のホストに tail -F するヤツ
@tmaiaroto
tmaiaroto / virtual.conf
Created August 9, 2012 18:48
Nginx Virtual Host Setup for OS X using Homebrew
#
# A virtual host using mix of IP-, name-, and port-based configuration.
# This is based on using Homebrew for OS X. You can use this in other
# cases though, but you'll likely need to adjust some of the paths below.
#
server {
# Replace this port with the right one for your requirements
# listen 80 [default|default_server]; #could also be 1.2.3.4:80
@juno
juno / github-flow.ja.md
Last active April 9, 2021 02:20
GitHub Flow (Japanese translation) Latest version is here: https://gist.github.com/Gab-km/3705015

GitHub Flow

31 Aug 2011

git-flowの問題点 (Issues with git-flow)

私は人々にGitを教えるためにあちこちを飛び回っているが、最近のほぼすべてのクラスやワークショップでgit-flowについてどう思うかを尋ねられた。私はいつも、git-flowは素晴らしいと思うと答えている。何百万ものワークフローを持ったシステム(Git)を提供し、ドキュメントもあるし、よくテストされている。フレキシブルなワークフローは、実に容易なやり方で多くの開発者の役に立つ。標準的なものになりつつあり、開発者はプロジェクトや企業の間を移動しつつこの標準的なワークフローに馴染むことができる。

@smeranda
smeranda / facebook_like-box_responsive.css
Created May 1, 2012 20:37
Flexible width layout for Facebook Like Box/Activity Stream to use in Responsive Designs
/*
Make the Facebook Like box responsive (fluid width)
https://developers.facebook.com/docs/reference/plugins/like-box/
*/
/* This element holds injected scripts inside iframes that in some cases may stretch layouts. So, we're just hiding it. */
#fb-root {
display: none;
}