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 bash | |
if [[ ! ( # any of the following are not true | |
# 1st arg is an existing regular file | |
-f "$1" && | |
# ...and it has a .ipa extension | |
"${1##*.}" == "ipa" && | |
# 2nd arg is an existing regular file | |
-f "$2" && | |
# ...and it has an .mobileprovision extension |
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
String.prototype.padLeft = function (n, str) { | |
if (n < String(this).length) { | |
return this.toString(); | |
} | |
else { | |
return Array(n - String(this).length + 1).join(str || '0') + this; | |
} | |
} | |
function crc16(s) { |
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
background: #fff; | |
border-radius: 8px; | |
-webkit-box-shadow: 0 30px 60px -12px rgba(50,50,93,.25), 0 18px 36px -18px rgba(0,0,0,.3), 0 -12px 36px -8px rgba(0,0,0,.025); | |
box-shadow: 0 30px 60px -12px rgba(50,50,93,.25), 0 18px 36px -18px rgba(0,0,0,.3), 0 -12px 36px -8px rgba(0,0,0,.025); |
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
// source: https://stackoverflow.com/questions/29349684/how-can-i-specify-the-required-node-js-version-in-package-json | |
import semver from 'semver'; | |
import { engines } from './package'; | |
const version = engines.node; | |
if (!semver.satisfies(process.version, version)) { | |
console.log(`Required node version ${version} not satisfied with current version ${process.version}.`); | |
process.exit(1); | |
} |
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
@-webkit-keyframes u-progress-stripes { | |
from { background-position: 0 0 } | |
to { background-position: 40px 0 } | |
} | |
@-moz-keyframes u-progress-stripes { | |
from { background-position: 0 0 } | |
to { background-position: 40px 0 } | |
} | |
@keyframes u-progress-stripes { | |
from { background-position: 0 0 } |
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
#!/bin/bash | |
###################################################################### | |
# | |
# Product name: Foomatic PPD modifier for Yosemite | |
# version: 1.1 2014-10-28 | |
# | |
# Copyright 2014 Matt Broughton <walterwego@macosx.com> | |
# | |
# This program is freed software; you can redistribute it and/or modify it |
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
//Based on http://www.samliew.com/icval/ | |
const isNRIC = (str) => { | |
if (str.length != 9) | |
return false; | |
str = str.toUpperCase(); | |
let i; | |
const icArray = []; | |
for(i = 0; i < 9; i++) { |
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 bash | |
############################################################################## | |
# MIT License (MIT) | |
# Copyright © 2017 Silicon Jungles Pte Ltd | |
# | |
# git-flow-feature-close: merge squash feature commits to develop. | |
# | |
# References: | |
# |
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
/** | |
* http://applemusic.tumblr.com/ | |
* https://jsfiddle.net/xq56dmrh/ | |
*/ | |
/** Ultra Light */ | |
@font-face { | |
font-family: "San Francisco"; | |
font-weight: 100; | |
src: url("https://applesocial.s3.amazonaws.com/assets/styles/fonts/sanfrancisco/sanfranciscodisplay-ultralight-webfont.woff"); |
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 bash | |
echo | |
echo Checking Nginx config file... | |
ERR_MSG=$((sudo nginx -t) 2>&1) | |
if [ $? -eq 0 ]; then | |
echo -e "Nginx configuration file test : \e[32mPASSED\e[39m" | |
sudo nginx -s reload | |
if [ $? -eq 0 ]; then | |
echo Nginx configuration reloaded. | |
else |
NewerOlder