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
// given a string 'Hello my name is John.' | |
// reverse it | |
// output should be '.nhoJ si eman ym olleH | |
const s = 'Hello my name is John.'; | |
function reverseString(string) { | |
string = string.split(''); | |
string.reverse(); | |
return string.toString('').replace(/,/g, ''); |
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
import os | |
from botocore.vendored import requests | |
import time | |
import json | |
# set an environment variable when creating your lambda for your Slack key: | |
token = os.environ['LEGACY_KEY'] | |
#Delete files older than 30 days: | |
ts_to = int(time.time()) - 30 * 24 * 60 * 60 | |
def list_files(): |