sudo -i -u postgres
createuser --interactive --pwprompt
createdb -O user dbname
GRANT permissions ON DATABASE dbname TO username;
dropdb ...
dropuser ...
psql -d database_name -1 -f database_name.bak
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
Regex for matching ALL Japanese common & uncommon Kanji (4e00 – 9fcf) ~ The Big Kahuna! | |
([一-龯]) | |
Regex for matching Hirgana or Katakana | |
([ぁ-んァ-ン]) | |
Regex for matching Non-Hirgana or Non-Katakana | |
([^ぁ-んァ-ン]) | |
Regex for matching Hirgana or Katakana or basic punctuation (、。’) |
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
// REFERENCE UNICODE TABLES: | |
// http://www.rikai.com/library/kanjitables/kanji_codes.unicode.shtml | |
// http://www.tamasoft.co.jp/en/general-info/unicode.html | |
// | |
// TEST EDITOR: | |
// http://www.gethifi.com/tools/regex | |
// | |
// UNICODE RANGE : DESCRIPTION | |
// | |
// 3000-303F : punctuation |
url = 'http://data.linz.gv.at/katalog/population/abstammung/2012/auslg_2012.csv'
content = Net::HTTP.get_response(URI.parse(url)).body
{x: content}.to_json
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
{ | |
"data": [ | |
{ | |
"id": "7", | |
"type": "deck", | |
"attributes": { | |
"id": 7, | |
"name": "aaa", | |
"description": "aaa", | |
"user_id": 5, |
cd /opt/bitnami/
sudo ./use_redmine
cd /opt/bitnami/apps/redmine/htdocs/plugins
cd /opt/bitnami/apps/redmine/htdocs/
bundle install --without development test postgresql sqlite --no-deployment
bundle install --without development test postgresql sqlite --deployment
Change email without confirmation
@user = User.find_by_email('bob@site.com')
@user.email = 'dead@site.com'
@user.skip_reconfirmation!
@user.save!
Require password_confirmation when create new user
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
version: '2' | |
services: | |
api: | |
volumes: | |
- "nfsmount:${CONTAINER_DIR}" | |
volumes: | |
nfsmount: | |
driver: local | |
driver_opts: |
Vagrant was unable to mount VirtualBox shared folders. This is usually because the filesystem "vboxsf" is not available. This filesystem is made available via the VirtualBox Guest Additions and kernel module. Please verify that these guest additions are properly installed in the guest. This is not a bug in Vagrant and is usually caused by a faulty Vagrant box. For context, the command attempted was:
mount -t vboxsf -o uid=1000,gid=1000 vagrant /vagrant
The error output from the command was:
OlderNewer