Skip to content

Instantly share code, notes, and snippets.

View sankitch's full-sized avatar
🏠

Kiyoshi Sakata sankitch

🏠
  • Tokyo, Japan
  • 23:56 (UTC +09:00)
  • X @sankitch
View GitHub Profile
@sankitch
sankitch / Calendar.py
Created March 22, 2014 05:20
PyQt Calendar Sample.
# -*- coding: utf-8 -*-
"""
ZetCode PyQt4 tutorial
This example shows a QtGui.QCalendarWidget widget.
author: Jan Bodnar
website: zetcode.com
last edited: September 2011
curl -O http://svn.automattic.com/wordpress-i18n/ja/tags/3.8/messages/admin-ja.mo
curl -O http://svn.automattic.com/wordpress-i18n/ja/tags/3.8/messages/admin-ja.po
curl -O http://svn.automattic.com/wordpress-i18n/ja/tags/3.8/messages/admin-network-ja.mo
curl -O http://svn.automattic.com/wordpress-i18n/ja/tags/3.8/messages/admin-network-ja.po
curl -O http://svn.automattic.com/wordpress-i18n/ja/tags/3.8/messages/continents-cities-ja.mo
curl -O http://svn.automattic.com/wordpress-i18n/ja/tags/3.8/messages/continents-cities-ja.po
curl -O http://svn.automattic.com/wordpress-i18n/ja/tags/3.8/messages/ja.mo
curl -O http://svn.automattic.com/wordpress-i18n/ja/tags/3.8/messages/ja.po
#!/bin/bash
clear
stty erase '^?'
echo -n "Database Name: "
read DBNAME
echo -n "Database User: "
Post-install message from paperclip:
##################################################
# NOTE FOR UPGRADING FROM PRE-3.0 VERSION #
##################################################
Paperclip 3.0 introduces a non-backward compatible change in your attachment
path. This will help to prevent attachment name clashes when you have
multiple attachments with the same name. If you didn't alter your
attachment's path and are using Paperclip's default, you'll have to add
`:path` and `:url` to your `has_attached_file` definition. For example:
#!/bin/sh
dbname=wpsample
dbuser=root
dbhost=127.0.0.1
dbpass=password
wphost=localhost
wptitle="wp-cli sample site."
wpadmin_name="dontadmin"
wpadmin_email="mail@example.com"
function buildUrl(url, parameters) {
var qs = "";
for(var key in parameters) {
var value = parameters[key];
qs += encodeURIComponent(key) + "=" + encodeURIComponent(value) + "&";
}
if (qs.length > 0){
qs = qs.substring(0, qs.length-1); //chop off last "&"
url = url + "?" + qs;
}
@sankitch
sankitch / getUrl.sh
Last active December 18, 2015 12:09
sitemap.xmlから、URLの一覧を出力.
#!/bin/sh
curl $1 | awk -F"[<>]" '/loc/ { print $3 }'
#!/bin/sh
grep -rIn STRING .
# 拡張子絞りたい場合
grep -rIn STRING ./**/*.php
Send a Growl notification to a local or remote host
growlnotify [/t:title] [/id:id] [/s:sticky] [/p:priority] [/i:icon]
[/a:application] [/ai:icon] [/r:type] [/n:type]
[/cu:callbackurl]
[/host:host] [/port:port]
[/pass:password] [/enc:algorithm] [/hash:algorithm]
[/silent:nooutput]
messagetext
#!/bin/sh
chmod -R 777 {data/{cache,Smarty,logs,download{,s},class,upload,config},html/{install/temp,user_data,upload}}
chmod 777 html