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:
| -# put this in your layout | |
| -# what this does it is loads the split_asset application.css file using the correct sprockets name | |
| /[if lt IE 10] | |
| = stylesheet_link_tag stylesheet_path('application').gsub(/\/assets\//, '/split_assets/') |
| // Generate inline class names for your elements | |
| // | |
| // <div class="actions inset-vert-small-large"> | |
| // <button type="submit">Totes click me!</button> | |
| // </div> | |
| // | |
| // Padding | |
| // --------------- | |
| // pad-{item} : pad-small (padding: 10px) | |
| // pad-vert-{item}-{item + 1} : pad-vert-small-large (padding: 10px 0 40px 0) |
| /** @jsx React.DOM */ | |
| var MyComponent = React.createClass({ | |
| getInitialState: function() { | |
| // set up the initial state. used for "logical" initialization code | |
| return {perMinute: '-', perDay: '-'}; | |
| }, | |
| componentDidMount: function() { | |
| // fired only once, when the component is added to the DOM | |
| // used for initialization code that has "side effects" i.e. i/o, jquery plugins, etc | |
| var socket = io.connect(this.props.url); |
| # file: /etc/xdg/lxsession/LXDE/autostart | |
| # sudo raspi-config # Enable Boot To Desktop | |
| # idea via: http://lokir.wordpress.com/2012/09/16/raspberry-pi-kiosk-mode-with-chromium/ | |
| @lxpanel --profile LXDE | |
| @pcmanfm --desktop --profile LXDE | |
| # @xscreensaver -no-splash | |
| @xset s off |
| #!/bin/bash | |
| # This script cleans up your EC2 instance before baking a new AMI. | |
| # Run the following command in a root shell: | |
| # | |
| # bash <(curl -s https://gist.github.com/justindowning/5921369/raw/ami-clean.sh) | |
| function print_green { | |
| echo -e "\e[32m${1}\e[0m" | |
| } |
| #!/bin/sh | |
| # /share/MD0_DATA/.qpkg/autorun/autorun-plexconnect.sh | |
| # chmod +x /share/MD0_DATA/.qpkg/autorun/autorun-plexconnect.sh | |
| curl -L https://gist.github.com/tommeier/6255771/raw/update_plex_connect.sh | bash & |
Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
| # A simple Makefile alternative to using Grunt for your static asset compilation | |
| # | |
| ## Usage | |
| # | |
| # $ npm install | |
| # | |
| # And then you can run various commands: | |
| # | |
| # $ make # compile files that need compiling | |
| # $ make clean all # remove target files and recompile from scratch |
| class ApplicationController < ActionController::Base | |
| before_filter :ensure_xhr | |
| private | |
| def ensure_xhr | |
| if request.get? && request.format && (request.format.js? || request.format.json?) | |
| head :forbidden unless request.xhr? | |
| end | |
| end | |
| end |