This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set ignorecase | |
set smartcase | |
set backspace=indent,eol,start | |
set startofline | |
set ruler | |
set confirm | |
set visualbell | |
set t_vb= | |
set mouse=a | |
set notimeout ttimeout ttimeoutlen=200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define('UPDATE_WEBSITE_SH', '/path/to/update-website.sh'); | |
if (!(isset($_SERVER['HTTP_USER_AGENT']) && preg_match('/GitHub Hookshot/i', $_SERVER['HTTP_USER_AGENT']))) { | |
die(); | |
} | |
if (!file_exists(UPDATE_WEBSITE_SH)) { | |
die(); | |
} | |
if ( !isset($_POST['payload']) ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//転置インデックスを作成 | |
$comp_list_reverse = array(); | |
foreach ($comp_list as $key => $value) { | |
$hashed = md5($value); | |
$comp_list_reverse[$hashed] = $key; | |
} | |
$keyword_name_list_reverse = array(); | |
foreach ($keyword_name_list as $key => $value) { | |
$hashed = md5($value); | |
$keyword_name_list_reverse[$hashed] = $key; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
ARGS=$1; shift | |
MYSQL="mysql -uroot " | |
LIST_CONN_CMD=$(echo 'show all slaves status\G' | ${MYSQL} | grep 'Connection_name' | awk '{print $2}') | |
function show_seconds_behind_master () { | |
conn=$1; shift; | |
SECONDS=$(echo "show slave '${conn}' status\G" | ${MYSQL} | grep Seconds_Behind_Master | awk '{print $2}') |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var COMPILED = !0, goog = goog || {}; | |
goog.global = this; | |
goog.DEBUG = !1; | |
goog.LOCALE = "en"; | |
goog.provide = function (a) { | |
if (!COMPILED) { | |
if (goog.isProvided_(a)) | |
throw Error('Namespace "' + a + '" already declared.'); | |
delete goog.implicitNamespaces_[a]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Gmail経由でメール送信 | |
* 要Pear::Mail | |
* @param string $to 送信先 | |
* @param string $from 送信元 | |
* @param string $bcc BCC | |
* @param string $subj 件名 | |
* @param string $body メール本文 | |
* @return bool trueでメール送信完了 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- date822fmt.c~ 1998-06-15 19:53:16.000000000 +0900 | |
+++ date822fmt.c 2010-11-17 15:10:07.000000000 +0900 | |
@@ -1,3 +1,4 @@ | |
+#include <time.h> | |
#include "datetime.h" | |
#include "fmt.h" | |
#include "date822fmt.h" | |
@@ -12,18 +13,52 @@ | |
{ | |
unsigned int i; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- encoding: utf8 -*- | |
import re | |
date_jpn = "2013年11月7日 08時43分52秒" | |
r = re.compile("(.*)年(.*)月(.*)日 (.*)時(.*)分(.*)秒") | |
# 抽出した値はタプルになっているので、タプルを配列に変換 | |
dt = list(r.search(date_jpn).groups()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// The tab key will cycle through the settings when first created | |
// Visit http://wbond.net/sublime_packages/sftp/settings for help | |
// sftp, ftp or ftps | |
"type": "sftp", | |
"sync_down_on_open": true, | |
"sync_same_age": true, | |
OlderNewer