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
# check unused s3 bucket by compare min and max number of objects | |
import boto3 | |
from datetime import datetime | |
import csv | |
START_TIME = datetime(2019, 3, 1) | |
END_TIME = datetime(2019, 6, 1) | |
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/python | |
import sys | |
import os | |
import boto3 | |
from pprint import pprint | |
from functools import reduce | |
# export AWS_ACCESS_KEY_ID= | |
# export AWS_SECRET_ACCESS_KEY= | |
# export AWS_DEFAULT_REGION= |
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
class VoiceTube { | |
answer() { | |
if (document.querySelector('.title_info').textContent.includes('影片理解')) { | |
this.comprehension() | |
document.querySelector('.check_ans').click() | |
if (document.querySelector('.next_question') !== null) { | |
document.querySelector('.next_question').click() | |
} | |
if (document.querySelector('.go_game') !== null) { | |
document.querySelector('.go_game').click() |
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
<!-- | |
Inspired by | |
https://gist.github.com/mndza/74736feb073fc6b65334#file-gistfile1-html | |
https://github.com/denysvitali/megadecrypter | |
https://gist.github.com/artjomb/7ef1ee574a411ba0dd1933c1ef4690d1 | |
About Mega Links | |
http://megadownloaderapp.blogspot.com/2013/03/explaining-mega-links.html | |
--> | |
<!DOCTYPE html> | |
<html> |
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
<?php | |
namespace App\Validators; | |
class MobileValidator | |
{ | |
public function validate($attribute, $number, $countries) | |
{ | |
try { |
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
<?php | |
//1 | |
public function listByTagGroup($tag_group_id) | |
{ | |
return FaqTagGroup::find($tag_group_id)->faqTags->reduce(function ($carry, $faq_tag) { | |
return $carry->merge($faq_tag->faqs); | |
}, collect()); | |
} |
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
function send_msg(){ | |
var msg = document.getElementById("msg").value; | |
var telecom = document.getElementById("telecom").value; | |
var type = document.getElementById("type").value; | |
var file_name = document.getElementById('server_file_name').value; | |
var xhr = new XMLHttpRequest(); | |
xhr.open('POST','sms_send.php',true); | |
xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded"); | |
xhr.onload = function(e){ |