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:
| // Ever needed to escape '\n' as '\\n'? This function does that for any character, | |
| // using hex and/or Unicode escape sequences (whichever are shortest). | |
| // Demo: http://mothereff.in/js-escapes | |
| function unicodeEscape(str) { | |
| return str.replace(/[\s\S]/g, function(character) { | |
| var escape = character.charCodeAt().toString(16), | |
| longhand = escape.length > 2; | |
| return '\\' + (longhand ? 'u' : 'x') + ('0000' + escape).slice(longhand ? -4 : -2); | |
| }); | |
| } |
| // Example usage, a MIDI proxy that picks the first available MIDI input and routes its messages to the first MIDI outputs | |
| navigator.getUserMedia({midi: true}, function (MIDIAccess) { | |
| try { | |
| var input = MIDIAccess.getInput(MIDIAccess.enumerateInputs()[0]); | |
| var output = MIDIAccess.getOutput(MIDIAccess.enumerateInputs()[0]); | |
| } catch (e) { | |
| console.error("Couldn't find suitable MIDI devices"); | |
| } |
| # Enable syntax-highlighting in less. | |
| # Last tested on CentOS 6.3. | |
| # | |
| # First, add these two lines to ~/.bashrc | |
| # export LESSOPEN="| /usr/bin/src-hilite-lesspipe.sh %s" | |
| # export LESS=" -R " | |
| sudo yum -y install boost boost-devel ctags | |
| wget http://springdale.math.ias.edu/data/puias/unsupported/6/x86_64/source-highlight-3.1.6-3.puias6.x86_64.rpm |
People
:bowtie: |
π :smile: |
π :laughing: |
|---|---|---|
π :blush: |
π :smiley: |
:relaxed: |
π :smirk: |
π :heart_eyes: |
π :kissing_heart: |
π :kissing_closed_eyes: |
π³ :flushed: |
π :relieved: |
π :satisfied: |
π :grin: |
π :wink: |
π :stuck_out_tongue_winking_eye: |
π :stuck_out_tongue_closed_eyes: |
π :grinning: |
π :kissing: |
π :kissing_smiling_eyes: |
π :stuck_out_tongue: |
| import { Component } from "React"; | |
| export var Enhance = ComposedComponent => class extends Component { | |
| constructor() { | |
| this.state = { data: null }; | |
| } | |
| componentDidMount() { | |
| this.setState({ data: 'Hello' }); | |
| } | |
| render() { |
| // ## $.withAdvice | |
| // | |
| // Borrowed by [Flight](https://github.com/flightjs/flight). | |
| // | |
| // `withAdvice` is a mixin that defines `before`, `after` and `around` methods. | |
| // | |
| // These can be used to modify existing functions by adding custom code. All | |
| // components have advice mixed in to their prototype so that mixins can augment | |
| // existing functions without requiring knowledge of the original | |
| // implementation. |
| var AWS = require('aws-sdk'); | |
| var AWSCognito = require('amazon-cognito-identity-js'); | |
| var util = require('util'); | |
| var params = { | |
| Username: '', | |
| Password: '', | |
| UserPoolId: 'us-west-2_aLI134pRo', | |
| ClientId: '3jmku5aeaqe6pdkqa5q18trjk5', | |
| IdentityPoolId: 'us-west-2:93be5994-d1aa-4e3a-b088-3ed28fa4b068', |
| /** | |
| * Once this is running open your browser and hit http://localhost | |
| * You'll see that the request hits the proxy and you get the HTML back | |
| */ | |
| 'use strict'; | |
| const net = require('net'); | |
| const http = require('http'); |