search/tweets
では一週間以上前のツイートは検索できないので注意
search/universal
は公式のConsumerKey/ConsumerSecretでないと使用できない
当方では一切の責任を負いません
class Stack | |
attr_reader :stack | |
def initialize | |
@stack = [] | |
end | |
def push(element) | |
@stack.push(element) | |
end |
def mojibake_shiteru?(stdout) | |
error_info = nil | |
begin | |
stdout.split("\n") | |
rescue ArgumentError | |
require 'English' | |
error_info = $ERROR_INFO | |
end |
# gem 'google-cloud-firestore' | |
GOOGLE_APPLICATION_CREDENTIALS='foobar-firestore-beginner-1234567890abcdef.json' | |
require 'google/cloud/firestore' | |
firestore = Google::Cloud::Firestore.new( | |
project_id: 'foobar-12345678901234567890', | |
credentials: GOOGLE_APPLICATION_CREDENTIALS | |
) |
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
// munged from https://github.com/simontime/Resead | |
namespace sead | |
{ | |
class Random | |
{ |
for i in 0..10 do | |
puts "Hello, World #{i}!" | |
end |
package main | |
import ( | |
"fmt" | |
"github.com/nlopes/slack" | |
) | |
func main() { | |
api := slack.New("xoxp-12345-12345-12345-abcdef-abcdef") |
#!/bin/bash -xe | |
nohup FOOBAR >> /var/log/FOOBAR.log & | |
exit 0 |
class BackupChromeBookmarks | |
BOOKMARKS_ORIGIN = '/Users/YOUR_USERNAME/Library/Application Support/Google/Chrome/Default/Bookmarks'.freeze | |
BOOKMARKS_BAK = '/Users/YOUR_USERNAME/Library/Application Support/Google/Chrome/Default/Bookmarks.bak'.freeze | |
def initialize(backup_directory:) | |
@backup_directory = backup_directory | |
end | |
def execute | |
command = %Q(cp "#{BOOKMARKS_ORIGIN}" "#{@backup_directory}/#{Time.now.strftime('%Y%m%d_%H%M%S_Bookmarks')}") |
# TODO: データの永続化ができていない | |
version: '2' | |
services: | |
app: | |
container_name: filestash | |
image: machines/filestash | |
restart: always | |
environment: | |
- APPLICATION_URL=filestash.example.com | |
# - GDRIVE_CLIENT_ID=<gdrive_client> |