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
window.scrollTo(0,document.body.scrollHeight); |
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
@Configuration | |
public class FilterConfiguration { | |
@Bean | |
public FilterRegistrationBean<CountryFilter> perfFilter() { | |
FilterRegistrationBean<CountryFilter> registration = new FilterRegistrationBean<>(); | |
registration.setFilter(new CountryFilter()); | |
registration.addUrlPatterns("/*"); | |
return registration; |
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 requests | |
from bs4 import BeautifulSoup | |
import json | |
import sys | |
from datetime import datetime | |
# window._sharedData.entry_data.ProfilePage[0].graphql.user.edge_followed_by.count | |
try: | |
id = sys.argv[1] | |
except IndexError: |
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
public static String mapToJson(Map map, boolean isPretty) { | |
ObjectMapper mapper = new ObjectMapper(); | |
try { | |
return isPretty ? | |
mapper.writerWithDefaultPrettyPrinter().writeValueAsString(map) : | |
mapper.writeValueAsString(map); | |
} catch (JsonProcessingException e) { | |
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
<style> | |
.blind { | |
overflow: hidden; | |
position: absolute; | |
clip: rect(0 0 0 0); | |
width: 1px; | |
height: 1px; | |
margin: -1px; | |
} | |
</style> |
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 download(name, url) { | |
const save = document.createElement('a'); | |
save.download = name; | |
save.href = url.replace(/https?:\/\//gi, '://'); | |
save.target = '_blank'; | |
document.body.appendChild(save); | |
save.click(); | |
document.body.removeChild(save); | |
} |
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
#!/bin/sh | |
# ./print_access_log.sh keyword 20200302 server_list.txt | |
### server_list.txt ### | |
a | |
b | |
c | |
####################### | |
keyword=$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
import re | |
class StringUtils: | |
@staticmethod | |
def removeTags(contents): | |
contents = re.sub("<\/?[\w\?\"\.\=\-\ ]*>", "", contents) | |
contents = re.sub("(\\n\\t*\\n)+", "\\n", contents) | |
return contents |
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 time | |
import os | |
class IO: | |
def __init__(self, path, name): | |
if not os.path.exists(path): | |
os.makedirs(path) | |
self.path = path |
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
# reference: https://wkdtjsgur100.github.io/selenium-change-ip/ | |
# brew install geckodriver | |
# brew install tor | |
# brew services restart tor | |
from selenium import webdriver | |
from bs4 import BeautifulSoup | |
import os | |