Skip to content

Instantly share code, notes, and snippets.

View hoangthienan's full-sized avatar

An Hoang hoangthienan

  • Ho Chi Minh City
View GitHub Profile
@hoangthienan
hoangthienan / SSLExcludeCipherConnectionHelper.java
Created August 1, 2016 08:57
Here is my solution (java 1.6) removing TLS_DHE_ ciphers completely
package com.vht.sms.content.util;
import java.io.*;
import java.net.*;
import java.security.KeyStore;
import java.security.cert.Certificate;
import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.List;
@hoangthienan
hoangthienan / DNS.md
Last active July 31, 2019 18:55
Change DNS from Command Line of macOS

How to Set DNS Servers from the Command Line of macOS with networksetup

For example, to set a Mac with wi-fi to Google DNS of 8.8.8.8 the syntax would be:

networksetup -setdnsservers Wi-Fi 8.8.8.8

You can set multiple DNS servers if desired,

networksetup -setdnsservers Wi-Fi 208.67.222.222 208.67.220.220 8.8.8.8

foobar, foo, bar, baz, qux, quux, corge, grault, garply, waldo, fred, plugh, xyzzy, thud