Skip to content

Instantly share code, notes, and snippets.

View codezyx's full-sized avatar
🎯
Focusing

Yuxiang codezyx

🎯
Focusing
View GitHub Profile
@beatfactor
beatfactor / install_nginx_macos_source.md
Last active February 6, 2025 14:20
Install Nginx on Mac OS from source (without brew)

Install Nginx on Mac OS from source

no Homebrew required

1. Download Nginx

$ cd /usr/local/src
$ curl -OL http://nginx.org/download/nginx-1.12.2.tar.gz
$ tar -xvzf nginx-1.12.2.tar.gz && rm nginx-1.12.2.tar.gz
@JetXing
JetXing / IDCard.java
Last active December 3, 2020 14:28
java, 身份证号的正则表达式, regular expression for ID card
package com.gitcafe.android.base.fragment;
import android.util.Log;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.Hashtable;
import java.util.regex.Matcher;
@codyaray
codyaray / ValidatingJacksonJsonProvider.java
Created January 2, 2013 00:34
Automatic model validation using Jersey, Jackson, and Hibernate Validator
package com.mydomain.myapp.resources;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import java.util.List;
import java.util.Set;
@miho
miho / DraggableNode01.java
Created October 2, 2012 17:03
Draggable Node 01 (make JavaFX nodes draggable)
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.Pane;
import javafx.scene.layout.StackPane;
import javafx.scene.paint.Color;