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
module CarrierWave | |
module FFMPEG | |
extend ActiveSupport::Concern | |
module ClassMethods | |
def faststart | |
process :faststart => true | |
end | |
def transcode options |
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
Snippet: [[SnippetName]] | |
Chunk: [[$ChunkName]] | |
System Setting: [[++SettingName]] | |
TV: [[*fieldName/TvName]] | |
Link tag: [[~PageId? ¶mName=`value`]] | |
Placeholder: [[+PlaceholderName]] | |
<?php |
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
require 'base64' | |
require 'RMagick' | |
include Magick | |
module Imager | |
class << self | |
def registered(app) | |
app.send :include, InstanceMethods | |
app.ready do |
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
require 'base64' | |
require 'RMagick' | |
include Magick | |
module Imager | |
class << self | |
def registered(app) | |
app.send :include, InstanceMethods | |
app.ready do |
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 | |
/** | |
* mix | |
* | |
* @param mixed $color_1 | |
* @param mixed $color_2 | |
* @param mixed $weight | |
* | |
* @return void |
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
<textarea name="my-xml-editor" data-editor="xml" rows="15"></textarea> | |
... | |
<textarea name="my-markdown-editor" data-editor="markdown" rows="15"></textarea> | |
... | |
<script src="//d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js"></script> | |
<script> | |
// Hook up ACE editor to all textareas with data-editor attribute | |
$(function () { |
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
void drawFolder(int sides, float rad) { | |
float ang = (frameCount * 2 * PI * 0.05) / sides; | |
PVector maxy = new PVector(0, 0); | |
PVector[] v = new PVector[sides]; | |
for (int i = 0; i != v.length; ++i) { | |
float angle = ((2 * PI * i) / sides) + ang; | |
float x = sin(angle) * rad; |
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
$charset = craft()->templates->getTwig()->getCharset(); | |
$value = new \Twig_Markup($value, $charset); |
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
void setup() { | |
size(500, 500); | |
noFill(); | |
strokeWeight(3); | |
strokeJoin(BEVEL); | |
} | |
float th1, th2, r, x, y, t; | |
int N = 16; |
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
/* passable motion blur effect using frame blending | |
* basically move your 'draw()' into 'sample()', time runs from 0 to 1 | |
* by dave | |
* http://beesandbombs.tumblr.com | |
*/ | |
int samplesPerFrame = 32; // more is better but slower. 32 is enough probably | |
int numFrames = 48; | |
float shutterAngle = 2.0; // this should be between 0 and 1 realistically. exaggerated for effect here | |
int[][] result; |
OlderNewer