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 python3 | |
import os | |
import time | |
import urllib.request | |
class Main: | |
URL = "https://www.google.com/images/branding/googleg/1x/googleg_standard_color_128dp.png" | |
def ping(self): |
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
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<profiles version="13"> | |
<profile kind="CodeFormatterProfile" name="GoogleStyle" version="13"> | |
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/> | |
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/> | |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/> | |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/> | |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/> | |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/> | |
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/> |
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
set-option -g prefix C-a | |
bind-key C-a last-window | |
bind-key -n F7 next-window | |
unbind % # Remove default binding since we're replacing | |
bind | split-window -h | |
bind _ split-window -v | |
bind a send-prefix | |
bind C-a last-window | |
bind C-p previous-window |
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/bash | |
# | |
# https://github.com/l-n-s/wireguard-install | |
# | |
# Copyright (c) 2018 Viktor Villainov. Released under the MIT License. | |
WG_CONFIG="/etc/wireguard/wg0.conf" | |
function get_free_udp_port | |
{ |
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
[ | |
"Perin del Vaga", | |
"Aramenta Dianthe Vail", | |
"Suzanne Valadon", | |
"Juan de Valdés Leal", | |
"Víctor Manuel García Valdés", | |
"Nina Petrovna Valetova", | |
"Pierre Adolphe Valette" | |
] |
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
for dirpath, dirs, files in os.walk(doc_path): | |
for f in files: | |
filename = os.path.join(dirpath, f) | |
print(filename) |
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
from html.parser import HTMLParser as HTMLParserBase | |
class HTMLParser(HTMLParserBase): | |
def __init__(self, *args, **kwargs): | |
super(HTMLParser, self).__init__(*args, **kwargs) | |
self.title = '' | |
self.catch_title = False | |
self.content = '' |
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
cat <<EOF >> outputfile | |
some lines | |
of text | |
EOF |
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
// '2017-09-15 15:55:25' | |
datetime.strftime(datetime.now(), '%Y-%m-%d %H:%M:%S') |
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
rsync -avrle ssh root@in-901-bj:/mnt1/squid/cache/baike /mnt1/squid/cache |
NewerOlder