This file contains hidden or 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
machine: | |
php: | |
version: 7.0.7 | |
timezone: | |
Asia/Tokyo | |
dependencies: | |
post: | |
- sudo service postgresql stop | |
- sudo service mongod stop |
This file contains hidden or 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
## https://forums.aws.amazon.com/message.jspa?messageID=675886 | |
## convert HTML FORM POST data to JSON for insertion directly into a Lambda function | |
## get the raw post data from the AWS built-in variable and give it a nicer name | |
#set($rawPostData = $input.path('$')) | |
## first we get the number of "&" in the string, this tells us if there is more than one key value pair | |
#set($countAmpersands = $rawPostData.length() - $rawPostData.replace("&", "").length()) | |
## if there are no "&" at all then we have only one key value pair. |
This file contains hidden or 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
var path = require('path'); | |
module.exports = function(grunt) { | |
require('load-grunt-tasks')(grunt); | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON("package.json"), | |
babel: { | |
options: { | |
sourceMap: true, | |
stage: 0 |
This file contains hidden or 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
<entityFramework> | |
<defaultConnectionFactory type="Npgsql.NpgsqlConnectionFactory, Npgsql.EntityFramework" /> | |
<providers> | |
<provider invariantName="Npgsql" type="Npgsql.NpgsqlServices, Npgsql.EntityFramework" /> | |
</providers> | |
</entityFramework> |
This file contains hidden or 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
// Get AccessToken and AccessTokenSecret | |
app.get('/call', function(req, res) { | |
var accessToken = req.session.passport.user.token; | |
var accessTokenSecret = req.session.passport.user.tokenSecret; | |
// any code .... | |
} | |
// Example request |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
import sys | |
import unittest | |
import pyramid.threadlocal | |
import pyramid.testing | |
import pyramid.paster | |
import sqlalchemy |
This file contains hidden or 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
□設定ファイル | |
$ vim ~/Library/LaunchAgents/org.postgresql.postgres.plist | |
https://gist.github.com/3154582 の内容を記載 | |
□起動 | |
$ launchctl start org.postgresql.postgres |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>KeepAlive</key> | |
<true/> | |
<key>Label</key> | |
<string>org.postgresql.postgres</string> | |
<key>ProgramArguments</key> | |
<array> |
This file contains hidden or 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 | |
$doc = simplexml_load_file('http://api.rakuten.co.jp/rws/3.0/rest?developerId=12657057e6e263dfe5dd57b5565078da&operation=BooksCDSearch&version=2011-12-01&artistName=AI'); | |
$doc->registerXPathNamespace('booksCDSearch', 'http://api.rakuten.co.jp/rws/rest/BooksCDSearch/2011-12-01'); | |
foreach ($doc->xpath('Body/booksCDSearch:BooksCDSearch/Items/Item') as $item) { | |
echo $item->title, "\n"; | |
} |
This file contains hidden or 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/bash | |
# vim: enc=utf8: | |
CMD_SENDMAIL=/usr/sbin/sendmail | |
CMD_UUENC=/usr/bin/uuencode | |
CMD_NKF=/usr/local/bin/nkf | |
ATTACHMENT_FILE=test.jpg | |
BOUNDARY=`date +%Y%m%d%H%M%N` |
NewerOlder