Skip to content

Instantly share code, notes, and snippets.

LinBoLen LinBoLen

Block or report user

Report or block LinBoLen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@giscafer
giscafer / identityCodeValid.js
Last active Feb 21, 2020
身份证合法校验
View identityCodeValid.js
var identityCodeValid = function (code) {
var city = {
11: "北京",
12: "天津",
13: "河北",
14: "山西",
15: "内蒙古",
21: "辽宁",
22: "吉林",
@agentsim
agentsim / highsierra_bootable.sh
Created Jun 10, 2017
Create bootable ISO from HighSierra Installer
View highsierra_bootable.sh
# Generate a BaseSystem.dmg with 10.13 Install Packages
hdiutil attach /Applications/Install\ macOS\ 10.13\ Beta.app/Contents/SharedSupport/InstallESD.dmg -noverify -mountpoint /Volumes/highsierra
hdiutil create -o /tmp/HighSierraBase.cdr -size 7316m -layout SPUD -fs HFS+J
hdiutil attach /tmp/HighSierraBase.cdr.dmg -noverify -mountpoint /Volumes/install_build
asr restore -source /Applications/Install\ macOS\ 10.13\ Beta.app/Contents/SharedSupport/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase
cp -R /Volumes/highsierra/Packages /Volumes/OS\ X\ Base\ System/System/Installation
hdiutil detach /Volumes/OS\ X\ Base\ System/
hdiutil detach /Volumes/highsierra/
mv /tmp/HighSierraBase.cdr.dmg /tmp/BaseSystem.dmg
@julianxhokaxhiu
julianxhokaxhiu / create-iso.sh
Created Sep 24, 2016
Simple bash script to create a Bootable ISO from macOS Sierra Install Image from Mac App Store
View create-iso.sh
#!/bin/bash
#
# Credits to fuckbecauseican5 from https://www.reddit.com/r/hackintosh/comments/4s561a/macos_sierra_16a238m_install_success_and_guide/
# Adapted to work with the official image available into Mac App Store
#
# Enjoy!
hdiutil attach /Applications/Install\ macOS\ Sierra.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app
hdiutil create -o /tmp/Sierra.cdr -size 7316m -layout SPUD -fs HFS+J
hdiutil attach /tmp/Sierra.cdr.dmg -noverify -nobrowse -mountpoint /Volumes/install_build
@tonyc726
tonyc726 / verify_id_card.js
Created Feb 16, 2016
客户端身份证验证
View verify_id_card.js
// 验证身份证号码
function verify_id_card(value) {
// 转换字母为大写,增加大小写X的容错能力
var id_card = value.toUpperCase();
//检查号码是否符合规范,包括长度,类型
var isCardNo = function(obj) {
//身份证号码为15位或者18位,15位时全为数字,18位前17位为数字,最后一位是校验位,可能为数字或字符X
var reg = /(^\d{15}$)|(^\d{17}(\d|X)$)/;
if (reg.test(obj) === false) {
@staltz
staltz / introrx.md
Last active Feb 27, 2020
The introduction to Reactive Programming you've been missing
View introrx.md
You can’t perform that action at this time.