Description |
If you're trying to do this, you came to the right place!
Watch this code work in real time: https://twitter.com/CodingDoug/status/942576182276497409
See also this gist for copying in the other direction: https://gist.github.com/CodingDoug/ffc4f050cc489a0280eb7f4cbe36af07
Apple will reject apps that are using private url schemes (Ugh, Apple....) if they are pretty much obvius. Some apps are rejected and others are not, so, be aware of this issue before implementing any of those URL's in your app as a feature.
- [UPDATE 4] iOS 10 update: apparently settings now can be reached using App-Pref instead of prefs
[UPDATE 3] For now you just can use url schemes to open your apps's settings with Swift 3.0 (Xcode 8). I'll keep you informed when OS preferences can be reached[UPDATE 2] The openURL() method of UIApplication is now deprecated. You should use application(_:open:options:) instead[UPDATE 1] Not yet tested in iOS 10. It will fail because of policies changes in URL scheme handling.
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/sh | |
if ! hash chrome-cli 2>/dev/null; then | |
echo "Couldn't find chrome-cli. Ensure it's installed and on your PATH." | |
exit 1 | |
fi | |
DIRNAME="/tmp/codpen+$(date '+%s')" | |
INDEX="$DIRNAME/index.html" | |
RELOAD="$DIRNAME/reload" |
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
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine | |
# This is how I upload my new Sol Trader builds (http://soltrader.net) | |
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash | |
S3KEY="my aws key" | |
S3SECRET="my aws secret" # pass these in | |
function putS3 | |
{ | |
path=$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
#!/bin/bash | |
# mov2giv in out width | |
# mov2gif video_file_in.mov gif_file_out.gif 300 | |
tmp_dir=/tmp/frames_$(date +%s) | |
mkdir $tmp_dir | |
if [ -z "$3" ] | |
then | |
size=600 |
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
<?php | |
// Updated 2018-01-24 to work with google/apiclient:^2.0 | |
/* | |
* Easiest to use composer to install google-api-php-client and generate autoloader | |
* If you dont want to use composer you can manually include any needed files | |
*/ | |
include_once 'vendor/autoload.php'; | |
/* | |
* Email address for admin user that should be used to perform API actions |
Fastly is essentially Varnish as a service. Similarly to how Heroku drastically simplifies the running of a web server, Fastly simplifies full-page caching of websites with running with dynamic content.
In a nutshell:
- Every time there is a request for your website, it is routed through Fastly instead of directly to your backend.
- If Fastly has an existing cache for the requested URL, it serves the cached page and your backend isn't touched at all.
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
/* | |
Copyright (c) 2017 Chris Patuzzo | |
https://twitter.com/chrispatuzzo | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
NewerOlder