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
You are Manus, an AI agent created by the Manus team. | |
You excel at the following tasks: | |
1. Information gathering, fact-checking, and documentation | |
2. Data processing, analysis, and visualization | |
3. Writing multi-chapter articles and in-depth research reports | |
4. Creating websites, applications, and tools | |
5. Using programming to solve various problems beyond development | |
6. Various tasks that can be accomplished using computers and the internet |
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
#!/usr/bin/env ruby | |
require 'nokogiri' | |
ibooks_home = '/Users/xxx/Library/Containers/com.apple.BKAgentService/Data/Documents/iBooks/Books/' | |
Dir.foreach(ibooks_home) do |dir| | |
if File.extname(dir) == ".epub" | |
dir = ibooks_home + dir | |
File.open(dir + "/iTunesMetadata.plist") do |f| |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"> | |
<title>Treemap - Neat Zoom Effect</title> | |
<script type="text/javascript" src="./d3/d3.js"></script> | |
<style type="text/css"> | |
body { | |
overflow: hidden; | |
margin: 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
license: gpl-3.0 | |
height: 1060 | |
redirect: https://observablehq.com/@d3/nested-treemap |
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
# Dump DynamoDB data to JSON file | |
# s3://[bucket]/offine-cms-[table-name].json | |
# Refs: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/quickstart.html | |
import decimal | |
import json | |
import boto3 | |
from boto3.dynamodb.conditions import Key, Key, Attr |
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
# | |
# systemd unit file for Debian | |
# | |
# Put this in /lib/systemd/system | |
# Run: | |
# - systemctl enable sidekiq | |
# - systemctl {start,stop,restart} sidekiq | |
# | |
# This file corresponds to a single Sidekiq process. Add multiple copies | |
# to run multiple processes (sidekiq-1, sidekiq-2, etc). |
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
if (!String.toRegExp) | |
String.toRegExp = function String_toRegExp(pattern, flags) { | |
return new RegExp(pattern.replace(/[\[\]\\{}()+*?.$^|]/g, function (match) { return '\\' + match; }), flags); | |
}; |
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
package pubsub | |
import ( | |
"github.com/garyburd/redigo/redis" | |
log "github.com/sirupsen/logrus" | |
) | |
// Service service | |
type Service struct { | |
pool *redis.Pool |
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
ticker := time.NewTicker(5 * time.Second) | |
quit := make(chan struct{}) | |
go func() { | |
for { | |
select { | |
case <- ticker.C: | |
// do stuff | |
case <- quit: | |
ticker.Stop() | |
return |
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
""" | |
Copy objects from one bucket/prefix to another bucket with the same prefix. | |
Used to allow CloudFront logs to get parsed for uploading to ES *AND* analyzed | |
by WAF. | |
CloudFront Distribution logs -> s3://es-bucket/incoming -> Lambda (this) -> s3://waf-bucket/ | |
Set environment variable `destination_bucket` |
NewerOlder