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
<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
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
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
@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
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
#!/bin/sh | |
HOME=/home1/irteam | |
JENKINS_HOME=${HOME}/jenkins_home | |
BACKUP_HOME=${HOME}/backup | |
mkdir -p -m777 ${BACKUP_HOME} | |
rm -rf ${BACKUP_HOME}/jenkins_origin.tar.gz | |
mv ${BACKUP_HOME}/jenkins.tar.gz ${BACKUP_HOME}/jenkins_origin.tar.gz |
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 | |
# yum install mailx | |
# /etc/mail.rc | |
# set smtp=host | |
subject=$1 | |
attach=$2 | |
content=$3 | |
to=$4 |
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 | |
target=$1 | |
source /home1/irteam/apps/${target}/source.me | |
user=$2 | |
from=$3 | |
to=$4 | |
path="hdfs://${target}/user/${user}/${to}" |
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 | |
# sh /home1/irteam/apps/boot/boot.sh restart /home1/irteam/deploy/api.jar dev jp | |
USER=`/usr/bin/whoami` | |
readonly BOOT_DIR=/home1/irteam/apps/boot | |
readonly L7CHECK_URL=http://localhost/monitor/l7check | |
readonly PROC_NAME=springboot | |
readonly PROC_PID="${BOOT_DIR}/${PROC_NAME}.pid" |