This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.
— Erik
<?php | |
/* | |
* XSS filter, recursively handles HTML tags & UTF encoding | |
* Optionally handles base64 encoding | |
* | |
* ***DEPRECATION RECOMMENDED*** Not updated or maintained since 2011 | |
* A MAINTAINED & BETTER ALTERNATIVE => kses | |
* https://github.com/RichardVasquez/kses/ | |
* | |
* This was built from numerous sources |
var mongoose = require('mongoose') | |
var mongoUrl = "mongodb://localhost:27017/test" | |
var connectWithRetry = function() { | |
return mongoose.connect(mongoUrl, function(err) { | |
if (err) { | |
console.error('Failed to connect to mongo on startup - retrying in 5 sec', err); | |
setTimeout(connectWithRetry, 5000); | |
} | |
}); |
These rules are adopted from the AngularJS commit conventions.
import Head from 'next/head' | |
import SEO from '../constants/seo' | |
export default ({ | |
title = SEO.title, | |
description = SEO.description, | |
pageUrl = SEO.siteUrl, | |
mainImage = SEO.mainImage, | |
iosApplink = SEO.quizBuzzHomeUrl, | |
androidAppLink = SEO.quizBuzzHomeUrl, |
workflow "Demo workflow" { | |
on = "push" | |
resolves = ["SNS Notification"] | |
} | |
action "Build Image" { | |
uses = "actions/docker/cli@c08a5fc9e0286844156fefff2c141072048141f6" | |
runs = ["/bin/sh", "-c", "docker build -t $IMAGE_URI ."] | |
env = { | |
IMAGE_URI = "xxxxxxxx.dkr.ecr.ap-northeast-1.amazonaws.com/github-action-demo:latest" |
const fs = require("fs"); | |
if (!fs.existsSync("package.json")) { | |
console.error( | |
"Cannot find package.json. Please run this script in your project directory." | |
); | |
process.exit(1); | |
} | |
const package = fs.readFileSync("package.json", "utf8"); |