Note: This was written using elasticsearch 0.9.
Elasticsearch will automatically create an index (with basic settings and mappings) for you if you post a first document:
$ curl -X POST 'http://localhost:9200/thegame/weapons/1' -d \
'{
"_id": 1,
Note: This was written using elasticsearch 0.9.
Elasticsearch will automatically create an index (with basic settings and mappings) for you if you post a first document:
$ curl -X POST 'http://localhost:9200/thegame/weapons/1' -d \
'{
"_id": 1,
ๆฅๆ: | 2025-03-15 |
---|---|
ไฝ: | ๆ้จๅ |
ใใผใธใงใณ: | 2025.2 |
URL: | https://shiguredo.jp/ |
ๆ้จๅ ใฏใฉใฆใใตใผใในใๆฏใใๆ่ก
{{set . "title" "Home"}} | |
{{template "header.html" .}} | |
<h1>Hello {{.myName}}</h1> | |
<a href="/">Back to form</a> | |
{{template "footer.html" .}} |
#Herokuๅฐๅ ฅใกใข
โ Heroku | Cloud Application Platform
##Herokuใจใฏ๏ผ
function dataURItoBlob(dataURI, callback) { | |
// convert base64 to raw binary data held in a string | |
// doesn't handle URLEncoded DataURIs - see SO answer #6850276 for code that does this | |
var byteString = atob(dataURI.split(',')[1]); | |
// separate out the mime component | |
var mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0] | |
// write the bytes of the string to an ArrayBuffer | |
var ab = new ArrayBuffer(byteString.length); |
package main | |
import ( | |
eventsource "github.com/antage/eventsource/http" | |
redis "github.com/vmihailenco/redis" | |
"log" | |
"net/http" | |
) | |
func haltOnErr(err error){ |
ใใใฎๆใๆฐใๆใใใซjsใฎใฆใใใใในใใฃใฆใฉใใใใฎใ่ฏใใฎใๆฉใใงใใๆฐใใใใฎใงใไธใคๆ ๅ ฑ้็ดใฎ็บใซใกใขๆธใใใใฆใใใพใใ
ไฝใใกใใใจๆ็ซ ๆธใใฆใใใฐใใใใซๅฏพใใๅๅฟใ้ใพใฃใฆใใชใฌใตใใใใใผ็ใชๅฑ้ใๆใใงใใพใใ
ๅไฝใในใใจใใใใใฆใใใใในใใจใใใใใใใใใขใฌใๆธใ็บใฎใใฌใผใ ใฏใผใฏใๆขใใฆใใพใใ
่ฆใใไบใๅฐใชใใฆๅผทๅใชใใคใ
ๆฉ่ฝใในใใจใใใใe2eใในใใใใใใใใใใขใฌใฎไบใฏๅฅ้่ใใๅฟ ่ฆใใใใพใใฎใงใไปๅใฏในใณใผใๅคใจใใพใใ
# Committing changes to a repo via the Github API is not entirely trivial. | |
# The five-step process is outlined here: | |
# http://developer.github.com/v3/git/ | |
# | |
# Matt Swanson wrote a blog post translating the above steps into actual API calls: | |
# http://swanson.github.com/blog/2011/07/23/digging-around-the-github-api-take-2.html | |
# | |
# I was not able to find sample code for actually doing this in Ruby, | |
# either via the HTTP API or any of the gems that wrap the API. | |
# So in the hopes it will help others, here is a simple function to |
GitHub webhooks for a URL by default only fire on repo pushes. There appears to be no way in the web UI to set up webhooks for other events. And so we go to the API. I prefer to do this type of thing with Hurl.
{
"name": "web",
"active": true,
brew install md5sha1sum |