This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
const aws = require('aws-sdk'); | |
const codepipeline = new aws.CodePipeline(); | |
const cloudfront = new aws.CloudFront(); | |
exports.handler = async (event, context) => { | |
let job = event['CodePipeline.job']; | |
let config = job.data.actionConfiguration.configuration.UserParameters; | |
try { | |
let params = JSON.parse(config); | |
if (!params || !params.distributionId) { |
/** | |
* Demonstrates how to use Apple's CloudKit server-to-server authentication | |
* | |
* Create private key with: `openssl ecparam -name prime256v1 -genkey -noout -out eckey.pem` | |
* Generate the public key to register at the CloudKit dashboard: `openssl ec -in eckey.pem -pubout` | |
* | |
* @see https://developer.apple.com/library/prerelease/ios/documentation/DataManagement/Conceptual/CloutKitWebServicesReference/SettingUpWebServices/SettingUpWebServices.html#//apple_ref/doc/uid/TP40015240-CH24-SW6 | |
* | |
* @author @spllr | |
*/ |
<?php | |
// I made this array by joining all the following lists + .php extension which is missing in all of them. | |
// please contribute to this list to make it as accurate and complete as possible. | |
// https://gist.github.com/plasticbrain/3887245 | |
// http://pastie.org/5668002 | |
// http://pastebin.com/iuTy6K6d | |
// total: 1223 extensions as of 16 November 2015 | |
$mime_types = array( | |
'3dm' => array('x-world/x-3dmf'), | |
'3dmf' => array('x-world/x-3dmf'), |
<div ng-app> | |
<div ng-controller="TestCtrl"> | |
<ul ng-repeat="elements in array" watchers-toggler="toggler()"> | |
<li ng-repeat="element in elements">{{element}}</li> | |
</ul> | |
</div> | |
</div> |
<?php | |
function mime_type($file) { | |
// there's a bug that doesn't properly detect | |
// the mime type of css files | |
// https://bugs.php.net/bug.php?id=53035 | |
// so the following is used, instead | |
// src: http://www.freeformatter.com/mime-types-list.html#mime-types-list | |
#!/usr/bin/ruby | |
# Create display override file to force Mac OS X to use RGB mode for Display | |
# see http://embdev.net/topic/284710 | |
require 'base64' | |
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay` | |
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten | |
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten |
function parseTime(time, format, step) { | |
var hour, minute, stepMinute, | |
defaultFormat = 'g:ia', | |
pm = time.match(/p/i) !== null, | |
num = time.replace(/[^0-9]/g, ''); | |
// Parse for hour and minute | |
switch(num.length) { | |
case 4: |
This gist assumes:
<html> | |
<!-- | |
This is an example of how to make browsers | |
offer to remember password and later fill in those passwords | |
for dynamic login forms. | |
To make the browser offer to remember passwords the form should be actually submitted. | |
Since we are handling login with AJAX we don't want the form to submit, so we are still submitting it | |
into a dummmy iframe with dummy URL. | |
It's good idea to actually create empty dummy.html file, otherwise you'll flood you error.log with 404s |