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
function archiveUpdatedFile() { | |
var orgFileId = PropertiesService.getScriptProperties().getProperty('ORG_FILE_ID') | |
var destFolderId = PropertiesService.getScriptProperties().getProperty('DEST_FOLDER_ID') | |
var orgFile = DriveApp.getFileById(orgFileId) | |
var destFolder = DriveApp.getFolderById(destFolderId) | |
var yesterday = new Date(new Date().setDate(new Date().getDate() - 1)); | |
var destFileName = Utilities.formatDate(yesterday, 'JST', 'yyyyMMdd') + '_memo' |
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
import sys | |
import csv | |
import re | |
import math | |
from time import sleep | |
from pyquery import PyQuery as pq | |
def parse(link: str): | |
row = [] | |
title = '' |
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
#!/usr/bin/env perl | |
open(FP, "< data.txt") or die("Error"); | |
my @migrations = split(/Table name: .*?Migration File: /s, join('', <FP>)); | |
close(FP); | |
my $cnt = 1; | |
my %files = (); | |
foreach my $migration (@migrations) { |
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
#!/usr/bin/env python3 | |
import os | |
import shutil | |
import datetime | |
import json | |
CHROME_BOOKMARKS = '/Users/ito_masakuni/Library/Application Support/Google/Chrome/Default/Bookmarks' | |
TARGET_DIR = '/Users/ito_masakuni/Desktop/misc/etc/chrome/bookmarks' |
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
child_process = require 'child_process' | |
module.exports = (robot) -> | |
sendEmail = (to, subject, msg, from, recipients='') -> | |
mailArgs = ['-s', subject, '-r', "#{from}", '-S', "From: #{from}", "#{to}"] | |
mailArgs = mailArgs.concat recipients | |
p = child_process.execFile '/usr/bin/mail', mailArgs, {}, (error, stdout, stderr) -> | |
console.log 'stdout: ' + stdout | |
console.log 'stderr: ' + stderr | |
p.stdin.write "#{msg}\n" |
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 | |
FROM="your_nice_mail@example.com" | |
TO="your_nice_mail@example.com" | |
TARGET_DIRS=("/Users/example/.Trash" "/Users/example/Desktop/work/tmp" "/Users/example/Downloads") | |
ARCHIVE_DIR=/Users/example/Desktop/misc/archives | |
TMP_DIR=/tmp/`date "+%Y%m%d%H%M%S"`_junk | |
BODY="" |