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
import javax.swing.*; | |
import java.awt.*; | |
public class CharacterCast { | |
private JFrame frame; | |
private JTextField textField; | |
private JButton lowerButton; | |
private JButton upperButton; | |
private JLabel label; |
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
# Systemd unit file for tomcat | |
[Unit] | |
Description=Apache Tomcat Web Application Container | |
After=syslog.target network.target | |
[Service] | |
Type=forking | |
Environment=JAVA_HOME=/usr/lib/jvm/jre | |
Environment=CATALINA_PID=/opt/tomcat/temp/tomcat.pid |
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
[ req ] | |
#default_bits = 2048 | |
#default_md = sha256 | |
#default_keyfile = privkey.pem | |
distinguished_name = req_distinguished_name | |
attributes = req_attributes | |
[ req_distinguished_name ] | |
countryName = Country Name (2 letter code) | |
countryName_min = 2 |
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
package main | |
import ( | |
"log" | |
"net/http" | |
"github.com/elazarl/goproxy" | |
"github.com/elazarl/goproxy/ext/auth" | |
) |
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
# Systemd unit file for chinadns | |
[Unit] | |
Description=Protect yourself against DNS poisoning in China | |
After=syslog.target network.target | |
[Service] | |
Type=simple | |
ExecStart=/opt/chinadns/chinadns -b 0.0.0.0 -p 5353 -c /opt/chinadns/chnroute.txt -s "8.8.8.8:53,8.8.4.4:53" | |
ExecStop=/bin/kill -15 $MAINPID |
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
* { | |
text-shadow: 0.01px 0.01px 0.01px #7c7c7c !important; | |
} | |
/* | |
Fonts Setting: | |
Standard : Microsoft YaHei | |
Serif : SimSun | |
San-Serif : Microsoft YaHei | |
Monospace : Consolas |
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
/* | |
* Licensed under the MIT License <https://opensource.org/licenses/MIT>. | |
* Copyright (c) 2017 Matsuz <[email protected]> | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is | |
* furnished to do so, subject to the following conditions: |
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 python3 | |
# | |
# pip install cryptography, pyjwt | |
from jwt.utils import ( | |
base64url_decode, | |
bytes_to_number, | |
) | |
from cryptography.hazmat.backends import default_backend | |
from cryptography.hazmat.primitives import serialization |
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
import os | |
import subprocess | |
from hashlib import md5 | |
from tempfile import TemporaryDirectory | |
TEX_TEMPLATE = r''' | |
\documentclass{article} | |
\usepackage[utf8]{inputenc} |
OlderNewer