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
mastodon=# SELECT id,url,uri FROM statuses ORDER BY created_at DESC LIMIT 10; | |
id | url | uri | |
--------------------+-----------------------------------------------------+------------------------------------------------------------------- | |
101021706725789900 | https://mstdn.b-shock.org/@pooza/101021706465667821 | https://mstdn.b-shock.org/users/pooza/statuses/101021706465667821 | |
101021536613538389 | https://mstdn.b-shock.org/@pooza/101021536290247023 | https://mstdn.b-shock.org/users/pooza/statuses/101021536290247023 | |
101021359813439899 | https://mstdn.b-shock.org/@pooza/101021359533523455 | https://mstdn.b-shock.org/users/pooza/statuses/101021359533523455 | |
101020388883530247 | https://mstdn.b-shock.org/@pooza/101020385819933342 | https://mstdn.b-shock.org/users/pooza/statuses/101020385819933342 | |
101018448167948034 | https://mstdn.b-shock.org/@pooza/101018447922314499 | https://mstdn.b-shock.org/users/pooza/statuses/1 |
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
HTTP/2 302 | |
date: Tue, 06 Nov 2018 02:10:59 GMT | |
content-type: text/html; charset=utf-8 | |
set-cookie: __cfduid=d262f6c61039be21a295d52376c4d7e0b1541470259; expires=Wed, 06-Nov-19 02:10:59 GMT; path=/; domain=.precure.ml; HttpOnly | |
x-frame-options: DENY | |
x-content-type-options: nosniff | |
x-xss-protection: 1; mode=block | |
location: https://precure.ml/@pooza/101021588761903393 | |
vary: Accept-Encoding | |
cache-control: no-cache |
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 | |
# PROVIDE: god | |
# REQUIRE: LOGIN | |
# KEYWORD: shutdown | |
# | |
# Add the following lines to /etc/rc.conf to enable the puppet agent: | |
# | |
# god_enable="YES" |
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
God.watch do |god| | |
god.name = 'growi' | |
god.env = { | |
'NODE_ENV' => 'production', | |
'MONGO_URI' => 'mongodb://localhost:27017/growi', | |
'PORT' => '3012', | |
} | |
god.dir = '/home/growi/growi' | |
god.uid = 'growi' | |
god.start = 'node /home/growi/growi/src/server/app.js' |
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
path = ENV['PATH'].split(':') | |
path.unshift('/sbin') | |
path.unshift('/usr/sbin') | |
path.unshift('/usr/local/sbin') | |
path.unshift('/bin') | |
path.unshift('/usr/bin') | |
path.unshift('/usr/local/bin') | |
path.uniq! | |
ENV['PATH'] = path.join(':') |
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
systemLog: | |
destination: syslog | |
storage: | |
dbPath: /var/db/mongodb | |
journal: | |
enabled: true | |
processManagement: | |
fork: 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
require 'rest-client' | |
response = RestClient.post( | |
'https://mstdn.example.com/api/v1/media', | |
{file: File.new(filepath, 'rb')}, | |
{'Authorization' => "Bearer #{token}"}, | |
) | |
media_id = JSON.parse(response.body)['id'].to_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
require 'amazon/ecs' | |
Amazon::Ecs.configure do |options| | |
options[:AWS_access_key_id] = AMAZON_ACCESS_KEY | |
options[:AWS_secret_key] = AMAZON_SECRET_KEY | |
options[:associate_tag] = AMAZON_ASSOCIATE_TAG | |
end | |
begin | |
response = Amazon::Ecs.item_lookup(asin, {country: 'jp', response_group: 'Images'}) |
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
SELECT | |
attachments.id AS attachment_id, | |
toots.id AS toot_id, | |
attachments.file_content_type AS content_type, | |
attachments.file_file_name AS file_name, | |
attachments.file_file_size AS file_size, | |
attachments.file_meta AS meta, | |
attachments.updated_at | |
FROM media_attachments AS attachments | |
INNER JOIN statuses AS toots ON attachments.status_id=toots.id |
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
listen = * | |
login_access_sockets = tcpwrap | |
# auth | |
auth_verbose = yes | |
disable_plaintext_auth = no | |
auth_mechanisms = plain login | |
passdb { | |
driver = passwd | |
} |