/etc/init.d/nginx start|restart|reload
/ect/nginx/nginx.conf
| /** | |
| * Luhn algorithm in JavaScript: validate credit card number supplied as string of numbers | |
| * @author ShirtlessKirk. Copyright (c) 2012. | |
| * @license WTFPL (http://www.wtfpl.net/txt/copying) | |
| */ | |
| var luhnChk = (function (arr) { | |
| return function (ccNum) { | |
| var | |
| len = ccNum.length, | |
| bit = 1, |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <ThreeDSecure> | |
| <Message id="999"> | |
| <VEReq> | |
| <version>1.0.2</version> | |
| <pan>4444333322221111</pan> | |
| <Merchant> | |
| <acqBIN>411111</acqBIN> | |
| <merID>99000001</merID> | |
| <password>99000001</password> |
| import java.net.InetAddress; | |
| import java.net.UnknownHostException; | |
| public class IPRangeChecker { | |
| public static long ipToLong(InetAddress ip) { | |
| byte[] octets = ip.getAddress(); | |
| long result = 0; | |
| for (byte octet : octets) { | |
| result <<= 8; |
| #!/bin/bash | |
| # | |
| # Converts LDIF data to CSV. | |
| # Doesn't handle comments very well. Use -LLL with ldapsearch to remove them. | |
| # | |
| # 2010-03-07 | |
| # [email protected] | |
| # | |
| # Show usage if we don't have the right params |
| # Example nginx + git HTTP Smart mode (git-http-backend) + HTTP Authentication + HTTPS redirect | |
| # [email protected] - http://jeroen.massar.ch | |
| server { | |
| listen 192.0.1.1:80; | |
| listen [2001:db8::1]:80; | |
| # Redirect all non-HTTPS traffic to the HTTPS variant | |
| return 301 https://$host$request_uri; | |
| } |
Git เป็น Version Control System แบบ distributed (หมายความว่าไม่มีศูนย์กลาง) และแบบ non-linear history (หมายความว่ามีประวัติการเปลี่ยนแปลงแบบไม่ใช่เส้นตรง) ดังนั้นทำให้คอนเซปต์ของ Git นั้นต่างจาก VCS รุ่นก่อนหน้าหลายอย่าง
ต่อไปจะอธิบายย่อๆ เรื่องคำสั่ง Git โดยอิงกับการทำงานใน GitHub เป็นสำคัญ
| import java.security.InvalidKeyException; | |
| import java.security.NoSuchAlgorithmException; | |
| import java.security.SignatureException; | |
| import java.util.Formatter; | |
| import javax.crypto.Mac; | |
| import javax.crypto.spec.SecretKeySpec; | |
| /** |
| import java.security.KeyPairGenerator; | |
| import java.security.KeyPair; | |
| import java.security.PrivateKey; | |
| import java.security.PublicKey; | |
| import java.security.KeyFactory; | |
| import java.security.spec.EncodedKeySpec; | |
| import java.security.spec.PKCS8EncodedKeySpec; | |
| import java.security.spec.X509EncodedKeySpec; | |
| import java.security.spec.InvalidKeySpecException; | |
| import java.security.NoSuchAlgorithmException; |