This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains 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
http://programmers.stackexchange.com/questions/21917/python-interview-questions | |
https://github.com/sigmavirus24/python-interview-questions | |
https://gist.github.com/xiangzhuyuan/7454001522d275021b2d | |
https://github.com/ContinuumIO/interview-questions | |
https://github.com/Flowerowl/python_articles | |
http://marselester.com/preparation-to-python-interview.html | |
https://github.com/zachwill/cracking-the-coding-interview | |
http://www.bogotobogo.com/python/python_interview_questions.php | |
https://www.quora.com/What-are-good-Python-interview-questions | |
https://www.reddit.com/r/Python/comments/1knw7z/python_interview_questions |
This file contains 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
Fock(){ | |
shell_name=`basename $0` | |
if fuser $0 2>/dev/null |sed "s/\\<$$\\>//" |grep -q '[0-9]';then | |
exit 1 | |
fi | |
} |
This file contains 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 | |
from email.MIMEText import MIMEText | |
from email.MIMEMultipart import MIMEMultipart | |
from email.MIMEBase import MIMEBase | |
from email import Utils, Encoders | |
import mimetypes, sys,smtplib,socket,getopt | |
class SendMail: | |
def __init__(self,smtp_server,from_addr,to_addr,user,passwd): | |
self.mailserver=smtp_server |
This file contains 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 python | |
import libtorrent as lt | |
import sys | |
import os | |
import time | |
from optparse import OptionParser | |
import socket | |
import struct | |
import fcntl |
This file contains 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
## --------------------------------------------------------- | |
## common functions | |
## usage: source "./func-common.sh" | |
## --------------------------------------------------------- | |
## ---------------- classical usage ------------------------ | |
## export WORKDIR=$( cd ` dirname $0 ` && pwd ) |
This file contains 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
net.core.rmem_default = 256960 | |
net.core.rmem_max = 513920 | |
net.core.wmem_default = 256960 | |
net.core.wmem_max = 513920 | |
net.core.netdev_max_backlog = 2000 |
This file contains 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
# vi /tftpboot/apache_doc/ksconfig/0026b93a2ae6 | |
lang en_US | |
langsupport zh_CN en_US --default=en_US | |
keyboard us | |
mouse | |
timezone Asia/Shanghai | |
rootpw ucanNOTsee88@me | |
reboot | |
install |
This file contains 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
__author__ = 'srv' | |
import smtplib | |
from email.mime.multipart import MIMEMultipart | |
from email.mime.text import MIMEText | |
from email.mime.application import MIMEApplication | |
username = '' # Email Address from the email you want to send an email | |
password = '' # Password | |
server = smtplib.SMTP('') |
This file contains 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
data "external" "asg_cousul_count" { | |
program = [ | |
"/bin/bash", | |
"scripts/get_asg_instance_count.sh", | |
] | |
query = { | |
region = "us-west-2" | |
asg_group_name = "asg-consul-production" | |
} |
OlderNewer